|
Novell exteNd Director 5.2 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for a timer. A Timer object is used to request a notification after a specified time delay. A timer measures one interval at a time.
When your code allocates a timer, you specify the handler object that will receive the notification. That handler object must implement the EbiTimerHandler interface.
MyTimerHandler myhandler = new MyTimerHandler(); fw.timer.EboTimerFactory timerFactory = new EboTimerFactory("My Timer Factory"); EbiTimer timer = timerFactory.allocateTimer((EbiTimerHandler) myhandler);
EbiTimerHandler
,
EboTimerFactory.allocateTimer(EbiTimerHandler)
Method Summary | |
void |
cancel()
Cancel the registered timer notification. |
Object |
getUserObject()
Retrieve the object that was associated with the timer when the notification was registered. |
void |
register(Date date)
Specify the date and time of the timer's next notification. |
void |
register(long interval,
boolean sinceLastEvent)
Specifies the interval before the timer's next notification. |
void |
setUserObject(Object userobject)
Store an object in the timer for future retrieval. |
Method Detail |
public void register(long interval, boolean sinceLastEvent)
interval
- The time in milliseconds until the timeExpired()
method of the handler object is called.sinceLastEvent
- Boolean true if the time interval
should be measured from the previous notification;
false if the time interval should be measured from the
time of this registration.public void register(Date date)
date
- The precise date and time that a notification
is desired. The timer has millisecond resolution.public void cancel()
public Object getUserObject()
EboTimerFactory
or by calling the setUserObject() method.public void setUserObject(Object userobject)
userobject
- An object to be stored in the timer.
|
Novell exteNd Director 5.2 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |