ResourceWatcherpublic class FileWatcher extends AbstractResourceWatcher<FileChangesListener>
| Constructor | Description |
|---|---|
FileWatcher(java.nio.file.Path file) |
Creates new file watcher on the given directory
|
| Modifier and Type | Method | 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(java.nio.file.Path file)
public void clearState()
protected void doInit()
throws java.io.IOException
AbstractResourceWatcherdoInit in class AbstractResourceWatcher<FileChangesListener>java.io.IOExceptionprotected void doCheckAndNotify()
throws java.io.IOException
AbstractResourceWatcher
Implementing watcher should check resource and notify all AbstractResourceWatcher.listeners().
doCheckAndNotify in class AbstractResourceWatcher<FileChangesListener>java.io.IOException