001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements. See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License. You may obtain a copy of the License at
008 *
009 * http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017 package org.apache.commons.io.input;
018
019 /**
020 * {@link TailerListener} Adapter.
021 *
022 * @version $Id: TailerListenerAdapter.java 1002844 2010-09-29 20:56:23Z niallp $
023 * @since Commons IO 2.0
024 */
025 public class TailerListenerAdapter implements TailerListener {
026
027 /**
028 * The tailer will call this method during construction,
029 * giving the listener a method of stopping the tailer.
030 * @param tailer the tailer.
031 */
032 public void init(Tailer tailer) {
033 }
034
035 /**
036 * This method is called if the tailed file is not found.
037 */
038 public void fileNotFound() {
039 }
040
041 /**
042 * Called if a file rotation is detected.
043 *
044 * This method is called before the file is reopened, and fileNotFound may
045 * be called if the new file has not yet been created.
046 */
047 public void fileRotated() {
048 }
049
050 /**
051 * Handles a line from a Tailer.
052 * @param line the line.
053 */
054 public void handle(String line) {
055 }
056
057 /**
058 * Handles an Exception .
059 * @param ex the exception.
060 */
061 public void handle(Exception ex) {
062 }
063
064 }