|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjegg.timer.Timer
A timer that can be used to periodically deliver timeout messages to a listener.
| Method Summary | |
void |
cancel()
Stop the timer. |
static Timer |
createRepeatingTimer(TimeoutListener l,
long period)
Create a timer that will deliver timeout messages periodically. |
static Timer |
createRepeatingTimer(TimeoutListener l,
long period,
long delay)
Create a timer that will deliver timeout messages periodically following the initial specified delay. |
static Timer |
createSingleShotTimer(TimeoutListener l,
long delay)
Create a timer that will deliver a single timeout message. |
long |
getDelay()
Return the initial delay before the timeouts start. |
long |
getInterval()
Return the delivery period of this timer, which is the number of milliseconds between timeouts. |
boolean |
isRepeating()
Return whether or not this timer will deliver multiple timeouts or just a single timeout. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static final Timer createRepeatingTimer(TimeoutListener l,
long period)
l - the listener for the timeout messages.period - the interval, in milliseconds, between timeout messages.
public static final Timer createRepeatingTimer(TimeoutListener l,
long period,
long delay)
l - the listener for the timeout messages.period - the interval, in milliseconds, between timeout messages.delay - the initial delay before the first timeout message is delivered to the listener.
public static final Timer createSingleShotTimer(TimeoutListener l,
long delay)
l - the listener for the timeout message.delay - the number of milliseconds to wait before the timeout
message is sent.
public final long getInterval()
public final long getDelay()
public final boolean isRepeating()
public final void cancel()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||