|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.indi.reactor.TimerHandler
public class TimerHandler
A timer class. It includes a timer method to be called when the timer expires as well as the expiration Date and supports an ordering of objects of this class with respect to the expiration date via implementation of the comparable interface.
Constructor Summary | |
---|---|
TimerHandler(java.util.Date expirationDate)
Class constructor |
Method Summary | |
---|---|
int |
compareTo(TimerHandler th)
Method implemented as part of the comparable interface to allow an ordering of TimerHandler objects with respect to the expiration date. |
boolean |
equals(java.lang.Object o)
Equals method overloaded as part of the contract of the comparable interface to allow an ordering of TimerHandler objects with respect to expiration date |
java.util.Date |
getExpirationDate()
|
void |
onTimer()
Callback method called by the reactor when the timer expires. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimerHandler(java.util.Date expirationDate)
expirationDate
- the expiration date of the timer (the Date when the
onTimer method is to be called by the reactor)Method Detail |
---|
public void onTimer()
onTimer
in interface TimerCallback
public java.util.Date getExpirationDate()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int compareTo(TimerHandler th)
compareTo
in interface java.lang.Comparable<TimerHandler>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |