|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | 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
(src) .
A similar class is present in java.util package of jdk version >= 1.3; for compatibility with jdk 1.2 we reimplemented it.
TimerQueue
(src) 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(java.lang.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 java.lang.Exception
execute
in interface Executable (src)
java.lang.Exception
public int compareTo(java.lang.Object other)
compareTo
in interface java.lang.Comparable
java.lang.ClassCastException
- if other is not a TimerTask, according to the Comparable contractprotected long getPeriod()
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |