Package jadex.commons
Class FileWatcher
- java.lang.Object
-
- jadex.commons.FileWatcher
-
public class FileWatcher extends java.lang.Object
Watcher for files, written to be backwards compatible. TODO: Implement polling.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
running
Flag if running.protected java.lang.Thread
thread
The watch thread.protected java.io.File
watchedfile
The watched file.
-
Constructor Summary
Constructors Constructor Description FileWatcher(java.lang.String filepath, java.lang.Runnable run, boolean forcepoll)
Creates the watcher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
finalize()
Overrideprotected void
pollingMode(java.lang.Runnable run)
Use polling mode.void
stop()
Stops the monitoring.
-
-
-
Method Detail
-
stop
public void stop()
Stops the monitoring.
-
pollingMode
protected void pollingMode(java.lang.Runnable run)
Use polling mode.- Parameters:
run
- The user runnable.
-
finalize
protected void finalize() throws java.lang.Throwable
Override- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
-