@Exported 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
EventDispatcher
dispatchEvent
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
EventException
protected void dispatchNonBlocking(E e) throws EventException
EventException
public void setRegistry(R reg)
EventDispatcher
setRegistry
in interface EventDispatcher<E extends Event,R extends ListenerRegistry<? extends Listener>>
reg
- registry