|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread org.iperg.part.core.IpEventManager
public class IpEventManager
The IpEventManager
class specifies a platform manager
that is responsible for dispatching events to their
destinations. The platform provides a singelton event manager
instance which can be retrieved using the getInstance
method:
IpEventManager mgr = IpEventManager.getInstance();
Events can be dispatched to their destinations using the
dispatch
method. This will cause the
handleEvent
method of the event handler identified by
the event's destination attribute to be invoked. If the destination
attribute is null
, the event will be dispatched to the
application's event handler set via the
setEventHandler
method of the
IpLocalProcess
singleton instance.
The event manager uses a separate dispatch thread to dispatch
events to event handlers. This means that when a thread calls the
dispatch
method, the event is not immediately
dispatched to the appropriate handler. Instead, the event is added
to a queue of events managed by the event manager. Later, when the
manager's dispatch thread wakes up, it removes events from the
queue and deliveres them to the correct event handler.
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 |
Method Summary | |
---|---|
void |
dispatch(IpEvent event)
Dispatch an event. |
static IpEventManager |
getInstance()
The main access method to retrieve the singleton event manager instance. |
void |
run()
Event dispatching thread's run method. |
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 |
Method Detail |
---|
public static IpEventManager getInstance()
public void dispatch(IpEvent event)
event
- The event to be dispatchedpublic void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |