| org.columba.core.filemonitor.FileObserver
FileObserver | public interface FileObserver (Code) | | author: Celso Pinto |
Field Summary | |
final public static int | FILE_ADDED | final public static int | FILE_CHANGED | final public static int | FILE_REMOVED The changeCode is FILE_REMOVED when an observedFile has been removed
or a file contained in an observed directory has been removed. |
Method Summary | |
public void | fileChanged(File file, int changeCode) Notify an observer that a monitored file has changed, was deleted or
created. | public void | stoppingService() Notify the observer that the FileMonitorService is being interrupted. |
FILE_ADDED | final public static int FILE_ADDED(Code) | | The changeCode is FILE_ADDED when a new file was added to an observed
directory
|
FILE_CHANGED | final public static int FILE_CHANGED(Code) | | The changeCode is FILE_CHANGED when a file that is being observed (or
a file contained in an observed directory) has been changed
|
FILE_REMOVED | final public static int FILE_REMOVED(Code) | | The changeCode is FILE_REMOVED when an observedFile has been removed
or a file contained in an observed directory has been removed.
|
fileChanged | public void fileChanged(File file, int changeCode)(Code) | | Notify an observer that a monitored file has changed, was deleted or
created. This is a synchronous call so implementations must either be fast
or handle the changes in a separate thread
Parameters: file - the file path Parameters: changeCode - can be one of FILE_CHANGED,FILE_ADDED,FILE_REMOVED |
stoppingService | public void stoppingService()(Code) | | Notify the observer that the FileMonitorService is being interrupted.
If the FileMonitorService comes back up at a latter time, it's the
observer's responsability to attach to it again
|
|
|