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 voidfinalize()Overrideprotected voidpollingMode(Runnable run) Use polling mode.voidstop()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