public class SimpleDispatcher<E extends Event,R extends ListenerRegistry<? extends Listener>> extends Object implements EventDispatcher<E,R>
| Constructor and Description |
|---|
SimpleDispatcher() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
dispatchBlocking(E e) |
void |
dispatchEvent(E e)
Dispatches the event to registered Listeners (See Listener modes for a discussion on the intended behavior of this method)
|
protected void |
dispatchNonBlocking(E e) |
void |
setRegistry(R reg)
Sets (injects) a ListenerRegistry to be used for discovering Listeners.
|
public void dispatchEvent(E e) throws EventException
EventDispatcherdispatchEvent in interface EventDispatcher<E extends Event,R extends ListenerRegistry<? extends Listener>>e - Event to be dispatchedEventException - if the dispatchprotected void dispatchBlocking(E e) throws EventException
EventExceptionprotected void dispatchNonBlocking(E e) throws EventException
EventExceptionpublic void setRegistry(R reg)
EventDispatchersetRegistry in interface EventDispatcher<E extends Event,R extends ListenerRegistry<? extends Listener>>reg - registry