Package jadex.common
Class FileWatcher
java.lang.Object
jadex.common.FileWatcher
Watcher for files, written to be backwards compatible.
TODO: Implement polling.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFileWatcher
(String filepath, Runnable run, boolean forcepoll) Creates the watcher. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
finalize()
Overrideprotected void
pollingMode
(Runnable run) Use polling mode.void
stop()
Stops the monitoring.
-
Field Details
-
running
protected boolean runningFlag if running. -
thread
The watch thread. -
watchedfile
The watched file.
-
-
Constructor Details
-
FileWatcher
Creates the watcher.- Parameters:
filepath
- File to watch.run
- Callback on changes.
-
-
Method Details