public class FileWatcher extends AbstractResourceWatcher<FileChangesListener>
| Constructor and Description |
|---|
FileWatcher(Path file)
Creates new file watcher on the given directory
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearState()
Clears any state with the FileWatcher, making all files show up as new
|
protected void |
doCheckAndNotify()
Will be called periodically
|
protected void |
doInit()
Will be called once on initialization
|
addListener, checkAndNotify, init, listeners, removepublic FileWatcher(Path file)
public void clearState()
protected void doInit()
throws IOException
AbstractResourceWatcherdoInit in class AbstractResourceWatcher<FileChangesListener>IOExceptionprotected void doCheckAndNotify()
throws IOException
AbstractResourceWatcher
Implementing watcher should check resource and notify all AbstractResourceWatcher.listeners().
doCheckAndNotify in class AbstractResourceWatcher<FileChangesListener>IOExceptionCopyright © 2009–2016. All rights reserved.