@NotThreadSafe
public class EventRouter
extends java.lang.Object
Constructor and Description |
---|
EventRouter() |
Modifier and Type | Method and Description |
---|---|
<L> void |
addListener(java.lang.Class<L> listenerClass,
L listener) |
<L> void |
addListener(java.lang.Class<L> listenerClass,
L listener,
java.lang.Runnable runIfFirstListenerWasAdded) |
<L,E> void |
fireEvent(java.lang.Class<L> listenerClass,
java.util.function.BiConsumer<L,E> invoker,
E event) |
<L> boolean |
hasListeners(java.lang.Class<L> listenerClass) |
<L> void |
removeListener(java.lang.Class<L> listenerClass,
L listener) |
<L> void |
removeListener(java.lang.Class<L> listenerClass,
L listener,
java.lang.Runnable runIfLastListenerWasRemoved) |
public <L,E> void fireEvent(java.lang.Class<L> listenerClass, java.util.function.BiConsumer<L,E> invoker, E event)
public <L> void addListener(java.lang.Class<L> listenerClass, L listener)
public <L> void addListener(java.lang.Class<L> listenerClass, L listener, java.lang.Runnable runIfFirstListenerWasAdded)
public <L> void removeListener(java.lang.Class<L> listenerClass, L listener)
public <L> void removeListener(java.lang.Class<L> listenerClass, L listener, java.lang.Runnable runIfLastListenerWasRemoved)
public <L> boolean hasListeners(java.lang.Class<L> listenerClass)