|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TimerControl
The control interface for the timer control.
Nested Class Summary | |
---|---|
static interface |
TimerControl.Callback
Provides a way for the Timer control to receive callbacks. |
static interface |
TimerControl.TimerSettings
|
Method Summary | |
---|---|
boolean |
getCoalesceEvents()
This is an 8.1 back-compat API; returns the CoalesceEvents setting. |
Serializable |
getPayload()
Gets the payload |
String |
getRepeatsEvery()
This is an 8.1 back-compat API; returns the repeat interval setting as duration. |
long |
getTimeout()
This is an 8.1 back-compat API; gets the relative number of seconds from now when the timer will timeout (rounded up). |
Date |
getTimeoutAt()
Get the absolute date and time. |
boolean |
isRunning()
Get the running state of the timer. |
void |
restart()
Resets the timer. |
void |
setCoalesceEvents(boolean coalesceEvents)
This is an 8.1 back-compat API; set the CoalesceEvents setting. |
void |
setPayload(Serializable payload)
Sets a payload so when the timer fires the data can be used by event handler(s) |
void |
setRepeatsEvery(long seconds)
Sets the repeating interval, in number of seconds |
void |
setRepeatsEvery(String duration)
Sets the repeating interval, in duration |
void |
setTimeout(long seconds)
Sets the timeout setting, using a long in number of seconds |
void |
setTimeout(String delay)
Sets the timeout setting, using a duration setting |
void |
setTimeoutAt(Date time)
Sets the absolute date and time at which the timer will expire the first time after being started or restarted. |
void |
start()
Starts the timer. |
void |
stop()
Stops the timer. |
Method Detail |
---|
@TransactionAttribute(value=SUPPORTS) void restart()
@TransactionAttribute(value=SUPPORTS) void start()
@TransactionAttribute(value=SUPPORTS) void stop()
void setTimeoutAt(Date time)
time
- The date and time at which the timer should
first expire after being started or restarted.Date getTimeoutAt()
void setPayload(Serializable payload)
Serializable getPayload()
boolean isRunning()
long getTimeout()
void setTimeout(long seconds)
seconds
- number of secondsvoid setTimeout(String delay)
delay
- a durationvoid setRepeatsEvery(long seconds)
seconds
- number of secondsvoid setRepeatsEvery(String duration)
duration
- setting in durationString getRepeatsEvery()
void setCoalesceEvents(boolean coalesceEvents)
coalesceEvents
- true or falseboolean getCoalesceEvents()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |