gate.util.reporting
Class FileWatcher
java.lang.Object
java.util.TimerTask
gate.util.reporting.FileWatcher
- All Implemented Interfaces:
- Runnable
abstract class FileWatcher
- extends TimerTask
A FileWather class to check whether the file is modified or not at specified
interval.
|
Constructor Summary |
FileWatcher(File file)
Creates a FileWatcher on a given file. |
|
Method Summary |
protected abstract void |
onChange(File file)
Specifies the actions to be taken when a file is modified. |
void |
run()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
timeStamp
private long timeStamp
file
private File file
FileWatcher
public FileWatcher(File file)
- Creates a FileWatcher on a given file.
- Parameters:
file - A handle of the file to be watched.
run
public final void run()
- Specified by:
run in interface Runnable- Specified by:
run in class TimerTask
onChange
protected abstract void onChange(File file)
throws BenchmarkReportExecutionException
- Specifies the actions to be taken when a file is modified.
- Parameters:
file - A handle of the file to be watched.
- Throws:
BenchmarkReportExecutionException