|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface permits to schedule differents tasks to specified delays, and
to make periodic any task, begining to the specified delay and rerun after
period time.
Both delay and period are longs. Differents implementations
will use this value as steps (in simulation case) or millis (in real
implementation case).
At last, also it permits to cancel all scheduled tasks.
The final implementations must to have a constructor with no arguments.
Method Summary | |
void |
cancel()
Cancels all TimerTasks active actually. |
void |
setTimerTask(TimerTask task,
long delay)
Sets a TimerTask to execute only once, after delay time. |
void |
setTimerTask(TimerTask task,
long delay,
long period)
Sets a TimerTask to execute only once, after delay time, and after each period time. |
Method Detail |
public void setTimerTask(TimerTask task, long delay)
task
- TimerTask implementation with the job to do.delay
- Time after which will be invoked task.run()public void setTimerTask(TimerTask task, long delay, long period)
task
- TimerTask implementation with the job to do.delay
- Timer after which will be invoked task.run()period
- The period of time for waiting after first invocation
(and followings) to invoke another time task.run().public void cancel()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |