Coverage Report - org.apache.commons.io.monitor.FileAlterationListener
 
Classes in this File Line Coverage Branch Coverage Complexity
FileAlterationListener
N/A
N/A
1
 
 1  
 /*
 2  
  * Licensed to the Apache Software Foundation (ASF) under one or more
 3  
  * contributor license agreements.  See the NOTICE file distributed with
 4  
  * this work for additional information regarding copyright ownership.
 5  
  * The ASF licenses this file to You under the Apache License, Version 2.0
 6  
  * (the "License"); you may not use this file except in compliance with
 7  
  * the License.  You may obtain a copy of the License at
 8  
  *
 9  
  *      http://www.apache.org/licenses/LICENSE-2.0
 10  
  *
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  */
 17  
 package org.apache.commons.io.monitor;
 18  
 import java.io.File;
 19  
 
 20  
 /**
 21  
  * A listener that receives events of file system modifications.
 22  
  * <p>
 23  
  * Register {@link FileAlterationListener}s with a {@link FileAlterationObserver}.
 24  
  * 
 25  
  * @see FileAlterationObserver
 26  
  * @version $Id: FileAlterationListener.java 1304052 2012-03-22 20:55:29Z ggregory $
 27  
  * @since 2.0
 28  
  */
 29  
 public interface FileAlterationListener {
 30  
 
 31  
     /**
 32  
      * File system observer started checking event.
 33  
      *
 34  
      * @param observer The file system observer
 35  
      */
 36  
     void onStart(final FileAlterationObserver observer);
 37  
 
 38  
     /**
 39  
      * Directory created Event.
 40  
      * 
 41  
      * @param directory The directory created
 42  
      */
 43  
     void onDirectoryCreate(final File directory);
 44  
 
 45  
     /**
 46  
      * Directory changed Event.
 47  
      * 
 48  
      * @param directory The directory changed
 49  
      */
 50  
     void onDirectoryChange(final File directory);
 51  
 
 52  
     /**
 53  
      * Directory deleted Event.
 54  
      * 
 55  
      * @param directory The directory deleted
 56  
      */
 57  
     void onDirectoryDelete(final File directory);
 58  
 
 59  
     /**
 60  
      * File created Event.
 61  
      * 
 62  
      * @param file The file created
 63  
      */
 64  
     void onFileCreate(final File file);
 65  
 
 66  
     /**
 67  
      * File changed Event.
 68  
      * 
 69  
      * @param file The file changed
 70  
      */
 71  
     void onFileChange(final File file);
 72  
 
 73  
     /**
 74  
      * File deleted Event.
 75  
      * 
 76  
      * @param file The file deleted
 77  
      */
 78  
     void onFileDelete(final File file);
 79  
 
 80  
     /**
 81  
      * File system observer finished checking event.
 82  
      *
 83  
      * @param observer The file system observer
 84  
      */
 85  
     void onStop(final FileAlterationObserver observer);
 86  
 }