|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mx.util.SchedulableRunnable
A schedulable runnable.
Subclasses should implement doRun() to do some real work.
setScheduler(RunnableScheduler) has to be invoked with a RunnableScheduler that has been started for the work to be performed. If the doRun() does not invoke setNextRun(), the link to the scheduler is removed.
RunnableScheduler
Constructor Summary | |
SchedulableRunnable()
Constructs a new schedulable runnable. |
Method Summary | |
int |
compareTo(Object o)
|
abstract void |
doRun()
Do the work, the scheduled runnable should do its work here |
boolean |
equals(Object obj)
|
long |
getNextRun()
Gets the next run timestamp |
void |
run()
Runs doRun() |
void |
setNextRun(long nextRun)
Sets the next run date |
RunnableScheduler |
setScheduler(RunnableScheduler scheduler)
Set the scheduler for this runnable |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SchedulableRunnable()
Method Detail |
public long getNextRun()
public void setNextRun(long nextRun)
If it is linked to a scheduler, it is temporarily removed while the date is modified.
nextRun
- the next run datepublic RunnableScheduler setScheduler(RunnableScheduler scheduler)
scheduler
- pass null to remove the runnable from any scheduler
public abstract void doRun()
public final void run()
If setNextRun() is not invoked during the doRun(), the link to the scheduler is removed
public int compareTo(Object o)
compareTo
in interface Comparable
public boolean equals(Object obj)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |