Interface IFileWatcher
-
- All Superinterfaces:
AutoCloseable,Closeable,IWatcher
- All Known Implementing Classes:
DefaultFileWatcher,JobLogFileWatcher,PollingFileWatcher
public interface IFileWatcher extends IWatcher
A file watcher that notify when receive files modifications or removal.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddFileWatchEventListener(IFileWatchEventListener listener)booleanisWatching()voidregister(String dirStrPath, FileFilter filter)voidremoveFileWatchEventListener(IFileWatchEventListener listener)voidstartWatch()voidstopWatch()
-
-
-
Method Detail
-
register
void register(String dirStrPath, FileFilter filter) throws IOException
- Throws:
IOException
-
startWatch
void startWatch() throws InterruptedException- Throws:
InterruptedException
-
addFileWatchEventListener
void addFileWatchEventListener(IFileWatchEventListener listener)
-
removeFileWatchEventListener
void removeFileWatchEventListener(IFileWatchEventListener listener)
-
isWatching
boolean isWatching()
-
-