Method Summary |
|
protected void | cleanUp()
Perform cleanup when this task stops. |
protected long | getTimeToSleepBetweenWorkMillis()
The number of milliseconds to sleep between performing work. |
protected long | getTimeToSleepWhileWaitingUntilStoppedMillis()
The number of milliseconds to sleep between checks to see if this
task has stopped. |
protected boolean | hasStopConditionBeenMet()
Determine whether or not this task should stop based on an
implementation-specific stop condition. |
abstract protected void | performWork()
Perform the actual work of this task. |
final public void | run()
Run the task. |
public synchronized void | stop()
Tell this task to stop performing its work. |
public void | waitUntilStopped()
Wait forever (or until interrupted) for this task to stop completely. |
public void | waitUntilStoppedFor(long waitTimeMillis)
Wait for at most a specified amount of milliseconds for this task to
stop completely. |
public void | waitUntilStoppedOrUntil(long waitLimitMillis)
Wait until at most a specified time for this task to stop completely. |