public class FileNameAwareListener extends Object implements FileEventListener
| Constructor and Description |
|---|
FileNameAwareListener(FileEventListener listener,
String fileName) |
| Modifier and Type | Method and Description |
|---|---|
FileEventListener |
getParent() |
boolean |
isRecursive()
If the paths monitored by this listener should be monitored recursively or not.
|
void |
onFailure()
Called when monitoring has failed, after this listener may stop
receiving events.
|
void |
onFileAdd(File file)
Called when a new file was added.
|
void |
onFileChange(File file)
Called when an existing file was modified.
|
void |
onFileDirty(File file)
Called when an event was lost or the state might be dirty.
|
void |
onFileRemove(File file)
Called when an existing file was removed.
|
public FileNameAwareListener(FileEventListener listener, String fileName)
listener - event listenerfileName - name of monitored file or null. If null all events in
monitored directory will be forwarded to target listener.public FileEventListener getParent()
public boolean isRecursive()
FileEventListenerisRecursive in interface FileEventListenerpublic void onFileAdd(File file)
FileEventListeneronFileAdd in interface FileEventListenerfile - resource path.public void onFileRemove(File file)
FileEventListeneronFileRemove in interface FileEventListenerfile - resource path.public void onFileChange(File file)
FileEventListeneronFileChange in interface FileEventListenerfile - resource path.public void onFileDirty(File file)
FileEventListeneronFileDirty in interface FileEventListenerfile - resource path from event or mostly null.public void onFailure()
FileEventListeneronFailure in interface FileEventListenerCopyright © 2014. All rights reserved.