verinec.util
Class AbstractProgramExec.TimeoutWatcher
java.lang.Object
java.util.TimerTask
verinec.util.AbstractProgramExec.TimeoutWatcher
- All Implemented Interfaces:
- Runnable
- Enclosing class:
- AbstractProgramExec
public class AbstractProgramExec.TimeoutWatcher
- extends TimerTask
A TimerTask that will call AbstractProgramExec.timeout() when invoked if the
ProgramExec instance has not finished.
You can instantiate a TimeoutWatcher using
ProgramExec p;
java.util.Timer t;
...
p.execAsync(); //returns immediately
t.schedule(p.new TimeoutWatcher(), 10000); //timeout after 10 seconds
...
|
Method Summary |
void |
run()
Aborts execution if program is still running. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractProgramExec.TimeoutWatcher
public AbstractProgramExec.TimeoutWatcher()
run
public void run()
- Aborts execution if program is still running.
- Specified by:
run in interface Runnable- Specified by:
run in class TimerTask