|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread org.w3c.tools.timers.EventManager
public class EventManager
This implements an event manager for timer events. Timer events are a way to have events occur some time in the future. They are an alternative to using separate threads which issue sleep requests themselves.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
EventManager()
|
Method Summary | |
---|---|
void |
handleTimerEvent(java.lang.Object rock,
long time)
Handle an timer event. |
static void |
main(java.lang.String[] args)
|
java.lang.Object |
recallTimer(java.lang.Object timer)
This recalls a previously registered timer event. |
java.lang.Object |
registerTimer(org.w3c.tools.timers.Event newEvent)
This is like the above registerTimer, except it takes an event object with the deliver time filled in. |
java.lang.Object |
registerTimer(long ms,
EventHandler handler,
java.lang.Object data)
registerTimer inserts a new timer event into the queue. |
void |
run()
|
void |
stopEventManager()
|
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EventManager()
Method Detail |
---|
public java.lang.Object registerTimer(long ms, EventHandler handler, java.lang.Object data)
public void stopEventManager()
public java.lang.Object registerTimer(org.w3c.tools.timers.Event newEvent)
public java.lang.Object recallTimer(java.lang.Object timer)
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void handleTimerEvent(java.lang.Object rock, long time)
EventHandler
handleTimerEvent
in interface EventHandler
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |