class EventManager extends Object
Modifier and Type | Field and Description |
---|---|
private Map<String,List<EventListener>> |
listenerRegistry
The registered event listeners (key: event class name, value: event listeners).
|
Constructor and Description |
---|
EventManager() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
addListener(DMXEvent event,
EventListener listener) |
private void |
dispatchEvent(EventListener listener,
DMXEvent event,
Object... params) |
(package private) void |
dispatchEvent(PluginImpl plugin,
DMXEvent event,
Object... params)
Delivers an event to a particular plugin.
|
(package private) void |
fireEvent(DMXEvent event,
Object... params) |
private List<EventListener> |
getListeners(DMXEvent event) |
private boolean |
isListener(PluginContext pluginContext,
DMXEvent event)
Returns true if the given plugin is a listener for the given event.
|
private void |
putListeners(DMXEvent event,
List<EventListener> listeners) |
(package private) void |
removeListener(DMXEvent event,
EventListener listener) |
private Map<String,List<EventListener>> listenerRegistry
EventManager()
void addListener(DMXEvent event, EventListener listener)
void removeListener(DMXEvent event, EventListener listener)
void dispatchEvent(PluginImpl plugin, DMXEvent event, Object... params)
private void dispatchEvent(EventListener listener, DMXEvent event, Object... params)
private boolean isListener(PluginContext pluginContext, DMXEvent event)
private List<EventListener> getListeners(DMXEvent event)
private void putListeners(DMXEvent event, List<EventListener> listeners)
Copyright © 2018. All Rights Reserved.