|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.impl.kernel.schedule.RecurringTaskHandleImpl
class RecurringTaskHandleImpl
Simple implementation of RecurringTaskHandle that lets
the handle be associated with a TimerTask so that cancelling
the handle also cancels the associated TimerTask.
| Constructor Summary | |
|---|---|
RecurringTaskHandleImpl(SchedulerQueue queue,
ScheduledTask task)
Creates an instance of RecurringTaskHandleImpl. |
|
| Method Summary | |
|---|---|
void |
cancel()
Cancels this handle, which will also cancel the associated TimerTask and notify the SchedulerQueue
about the task being cancelled. |
(package private) boolean |
isCancelled()
Returns whether this handle has been cancelled. |
(package private) void |
setTimerTask(TimerTask timerTask)
Sets the associated TimerTask for this handle. |
void |
start()
Starts the associated task running by passing the task to the SchedulerQueue via a call to addTask. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RecurringTaskHandleImpl(SchedulerQueue queue,
ScheduledTask task)
RecurringTaskHandleImpl.
queue - the SchedulerQueue that is using
this handletask - the task for this handle
IllegalArgumentException - if the task is not recurring| Method Detail |
|---|
void setTimerTask(TimerTask timerTask)
TimerTask for this handle. This
method may be called any number of times on a handle. Typically
a recurring task will re-set the associated TimerTask
with each recurrence of execution.
timerTask - the associated TimerTaskboolean isCancelled()
TimerTask.
true if this handle has been cancelled,
false otherwisepublic void cancel()
TimerTask and notify the SchedulerQueue
about the task being cancelled. If this handle has already been
cancelled, then an exception is thrown.
cancel in interface RecurringTaskHandleIllegalStateException - if this handle has already been cancelledpublic void start()
SchedulerQueue via a call to addTask.
If this handle has already been started or cancelled, then an
exception is thrown.
start in interface RecurringTaskHandleIllegalStateException - if the handle has already been started
or cancelled
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||