public interface ListenerBus<L,E> extends Logging
Modifier and Type | Method and Description |
---|---|
void |
addListener(L listener)
Add a listener to listen events.
|
java.util.concurrent.CopyOnWriteArrayList<L> |
listeners() |
void |
onPostEvent(L listener,
E event)
Post an event to the specified listener.
|
void |
postToAll(E event)
Post the event to all registered listeners.
|
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
java.util.concurrent.CopyOnWriteArrayList<L> listeners()
void addListener(L listener)
void postToAll(E event)
postToAll
caller should guarantee calling
postToAll
in the same thread for all events.