Package org.apache.tools.ant.util
Class Watchdog
java.lang.Object
org.apache.tools.ant.util.Watchdog
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
ERROR_INVALID_TIMEOUT
-
-
Constructor Details
-
Watchdog
public Watchdog(long timeout) Constructor for Watchdog.- Parameters:
timeout
- the timeout to use in milliseconds (must be >= 1).
-
-
Method Details
-
addTimeoutObserver
Add a timeout observer.- Parameters:
to
- the timeout observer to add.
-
removeTimeoutObserver
Remove a timeout observer.- Parameters:
to
- the timeout observer to remove.
-
fireTimeoutOccured
protected final void fireTimeoutOccured()Inform the observers that a timeout has occurred. This happens in the watchdog thread. -
start
public void start()Start the watch dog. -
stop
public void stop()Stop the watch dog. -
run
-