public class FileWatcher extends AbstractResourceWatcher<FileChangesListener>
Constructor and Description |
---|
FileWatcher(File 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
Implementing watcher should check resource and notify all
AbstractResourceWatcher.listeners() . |
protected void |
doInit()
Will be called once on initialization
|
addListener, checkAndNotify, init, listeners, remove
public FileWatcher(File file)
public void clearState()
protected void doInit()
AbstractResourceWatcher
doInit
in class AbstractResourceWatcher<FileChangesListener>
protected void doCheckAndNotify()
AbstractResourceWatcher
AbstractResourceWatcher.listeners()
.doCheckAndNotify
in class AbstractResourceWatcher<FileChangesListener>
Copyright © 2009–2015. All rights reserved.