ExecuteWatchdog
org.apache.tools.ant.taskdefs.ExecuteWatchdog
| Modifier and Type | Field and Description |
|---|---|
| public static final String | ERROR_INVALID_TIMEOUT
Error string. |
| private List | |
| private volatile boolean | stopped
marked as volatile to stop the compiler caching values or (in java1.5+, reordering access) |
| private long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| protected final void | |
| public void | |
| public synchronized void | |
| public synchronized void | |
| public synchronized void |
| ERROR_INVALID_TIMEOUT | back to summary |
|---|---|
| public static final String ERROR_INVALID_TIMEOUT Error string. timeout less than 1. | |
| observers | back to summary |
|---|---|
| private List<TimeoutObserver> observers | |
| stopped | back to summary |
|---|---|
| private volatile boolean stopped marked as volatile to stop the compiler caching values or (in java1.5+, reordering access) | |
| timeout | back to summary |
|---|---|
| private long timeout | |
| Watchdog | back to summary |
|---|---|
| public Watchdog(long timeout) Constructor for Watchdog.
| |
| addTimeoutObserver | back to summary |
|---|---|
| public void addTimeoutObserver(TimeoutObserver to) Add a timeout observer.
| |
| fireTimeoutOccured | back to summary |
|---|---|
| protected final void fireTimeoutOccured() Inform the observers that a timeout has occurred. This happens in the watchdog thread. | |
| removeTimeoutObserver | back to summary |
|---|---|
| public void removeTimeoutObserver(TimeoutObserver to) Remove a timeout observer.
| |
| run | back to summary |
|---|---|
| public synchronized void run() Implements java. 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 | back to summary |
|---|---|
| public synchronized void start() Start the watch dog. | |
| stop | back to summary |
|---|---|
| public synchronized void stop() Stop the watch dog. | |