| |
|
| java.lang.Object org.apache.tools.ant.util.Watchdog
Constructor Summary | |
public | Watchdog(long timeout) Constructor for Watchdog. |
ERROR_INVALID_TIMEOUT | final public static String ERROR_INVALID_TIMEOUT(Code) | | Error string.
|
Watchdog | public Watchdog(long timeout)(Code) | | Constructor for Watchdog.
Parameters: timeout - the timeout to use in milliseconds (must be >= 1). |
addTimeoutObserver | public void addTimeoutObserver(TimeoutObserver to)(Code) | | Add a timeout observer.
Parameters: to - the timeout observer to add. |
fireTimeoutOccured | final protected void fireTimeoutOccured()(Code) | | Inform the observers that a timeout has occurred.
This happens in the watchdog thread.
|
removeTimeoutObserver | public void removeTimeoutObserver(TimeoutObserver to)(Code) | | Remove a timeout observer.
Parameters: to - the timeout observer to remove. |
run | public synchronized void run()(Code) | | The run method of the watch dog thread.
This simply does a wait for the timeout time, and
if the stop flag has not been set when the wait has returned or
has been interrupted, the watch dog listeners are informed.
|
start | public synchronized void start()(Code) | | Start the watch dog.
|
stop | public synchronized void stop()(Code) | | Stop the watch dog.
|
|
|
|