Package jadex.commons
Class FileWatcher
- java.lang.Object
-
- jadex.commons.FileWatcher
-
public class FileWatcher extends java.lang.ObjectWatcher for files, written to be backwards compatible. TODO: Implement polling.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanrunningFlag if running.protected java.lang.ThreadthreadThe watch thread.protected java.io.FilewatchedfileThe 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 voidfinalize()Overrideprotected voidpollingMode(java.lang.Runnable run)Use polling mode.voidstop()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.ThrowableOverride- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
-