public class EventDispatcherImpl extends java.lang.Object implements EventDispatcher
| Constructor and Description |
|---|
EventDispatcherImpl() |
EventDispatcherImpl(boolean inUseQueue,
java.lang.String inDebName) |
EventDispatcherImpl(boolean inUseQueue,
java.lang.String inDebString,
EventDispatcher inParent) |
| Modifier and Type | Method and Description |
|---|---|
<E extends Event> |
dispatch(E event)
Dispatch an event, passing the event to matching registered handlers.
|
void |
handle(Event inEvent,
java.lang.Exception ex)
Called when a matching event is dispatched.
|
int |
handleOrder() |
java.lang.Class<Event> |
handleType() |
void |
onCancelHandler()
Called when this handler is unregistered with the dispatcher.
|
boolean |
register(java.lang.Object handlerObj)
Register a new event handler.
|
EventDispatchHandler<Event> |
setParent(EventDispatchHandler<Event> inParent)
Sets the parent event dispatcher.
|
void |
unregister(java.lang.Object handlerObj)
Unregister an event handler.
|
void |
unregisterAll()
Remove all event handlers.
|
public EventDispatcherImpl()
public EventDispatcherImpl(boolean inUseQueue,
java.lang.String inDebName)
public EventDispatcherImpl(boolean inUseQueue,
java.lang.String inDebString,
EventDispatcher inParent)
public java.lang.Class<Event> handleType()
handleType in interface EventDispatchHandler<Event>public int handleOrder()
handleOrder in interface EventDispatchHandler<Event>public void handle(Event inEvent, java.lang.Exception ex) throws java.lang.Exception
EventDispatchHandlerhandle in interface EventDispatchHandler<Event>handle in interface EventHandler<Event>inEvent - - The dispatched event.ex - - An exception to pass to the handlerjava.lang.Exceptionpublic void onCancelHandler()
EventDispatchHandleronCancelHandler in interface EventDispatchHandler<Event>public boolean register(java.lang.Object handlerObj)
throws RegistrationException
EventDispatcherregister in interface EventDispatcherhandlerObj - - The event handler to register with this dispatcher.RegistrationExceptionpublic void unregister(java.lang.Object handlerObj)
EventDispatcherunregister in interface EventDispatcherhandlerObj - - The event handler to register with this dispatcher.public void unregisterAll()
EventDispatcherunregisterAll in interface EventDispatcherpublic EventDispatchHandler<Event> setParent(EventDispatchHandler<Event> inParent)
EventDispatchersetParent in interface EventDispatcherpublic <E extends Event> void dispatch(E event)
EventDispatcherdispatch in interface EventDispatcherevent - - The event to dispatch.