de.fzj.unicore.wsrflite.utils
Class FileWatcher
java.lang.Object
de.fzj.unicore.wsrflite.utils.FileWatcher
- All Implemented Interfaces:
- Runnable
public class FileWatcher
- extends Object
- implements Runnable
helper to watch a file and invoke a specific action if it was modified.
This should be executed periodically, for example using the scheduled executor
service from the ResourcePool
- Author:
- schuller
|
Method Summary |
void |
run()
check if target file has been touched and invoke
the action if it has |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileWatcher
public FileWatcher(File target,
Runnable action)
throws FileNotFoundException
- Throws:
FileNotFoundException
run
public void run()
- check if target file has been touched and invoke
the action if it has
- Specified by:
run in interface Runnable
Copyright © 2010. All Rights Reserved.