|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jboss.util.TimerTask
A class that represent a task that can be scheduled for one-shot or
repeated execution by a TimerQueue.
A similar class is present in java.util package of jdk version >= 1.3; for compatibility with jdk 1.2 we reimplemented it.
TimerQueue| Constructor Summary | |
protected |
TimerTask()
Creates a TimerTask object that will be executed once. |
protected |
TimerTask(long period)
Creates a TimerTask object that will be executed every period
milliseconds. |
| Method Summary | |
boolean |
cancel()
Cancels the next execution of this TimerTask (if any). |
int |
compareTo(Object other)
A TimerTask is less than another if it will be scheduled before. |
abstract void |
execute()
The task to be executed, to be implemented in subclasses. |
protected long |
getPeriod()
Returns the period of this TimerTask |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected TimerTask()
protected TimerTask(long period)
period
milliseconds.
period - the execution period; if zero, will be executed only once.| Method Detail |
public boolean cancel()
public abstract void execute()
throws Exception
execute in interface ExecutableExceptionpublic int compareTo(Object other)
compareTo in interface ComparableClassCastException - if other is not a TimerTask, according to the Comparable contractprotected long getPeriod()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||