Class EventRouter

java.lang.Object
io.jmix.core.common.event.EventRouter

@NotThreadSafe public class EventRouter extends Object
Generic Event router with lazily initialized event map.
  • Constructor Details

    • EventRouter

      public EventRouter()
  • Method Details

    • fireEvent

      public <L, E> void fireEvent(Class<L> listenerClass, BiConsumer<L,E> invoker, E event)
    • addListener

      public <L> void addListener(Class<L> listenerClass, L listener)
    • addListener

      public <L> void addListener(Class<L> listenerClass, L listener, Runnable runIfFirstListenerWasAdded)
    • removeListener

      public <L> void removeListener(Class<L> listenerClass, L listener)
    • removeListener

      public <L> void removeListener(Class<L> listenerClass, L listener, Runnable runIfLastListenerWasRemoved)
    • removeListeners

      public <L> void removeListeners(Class<L> listenerClass)
    • hasListeners

      public <L> boolean hasListeners(Class<L> listenerClass)