|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.commons.utils.fam.FileAlterationMonitor
public class FileAlterationMonitor
File alteration monitor for monitoring changes in a directory. Supports recursive scanning and filters.
FileAlterationListener| Constructor Summary | |
|---|---|
FileAlterationMonitor(java.io.File dir,
long interval,
boolean recurse,
java.io.FileFilter filter)
Creates a new FileAlterationMonitor. |
|
| Method Summary | |
|---|---|
void |
registerListener(FileAlterationListener listener)
Registers a FileAlterationListener which is notified when changes are detected. |
void |
removeListener(FileAlterationListener listener)
Removes a FileAlterationListener. |
void |
start()
Starts the file alteration monitor worker thread. |
void |
stop()
Stops the file alteration monitor worker thread. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileAlterationMonitor(java.io.File dir,
long interval,
boolean recurse,
java.io.FileFilter filter)
FileAlterationMonitor.
dir - directory to be monitoredinterval - number of milliseconds to wait between checksrecurse - if true, subdirectories (and their subdirectories, ...) are monitored as wellfilter - optional filter that allows to specify for which files events should be generated, may be null (report
changes on all files)| Method Detail |
|---|
public void registerListener(FileAlterationListener listener)
FileAlterationListener which is notified when changes are detected.
listener - listener to be registeredpublic void removeListener(FileAlterationListener listener)
FileAlterationListener.
listener - listener to be removedpublic void start()
java.lang.RuntimeException - if the worker thread is already runningpublic void stop()
java.lang.RuntimeException - if the worker thread wasn't running
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||