Class EventBus

java.lang.Object
io.jmix.flowui.kit.event.EventBus
All Implemented Interfaces:
Serializable

public class EventBus extends Object implements Serializable
See Also:
  • Field Details

    • EVENTS_MAP_EXPECTED_MAX_SIZE

      protected static final int EVENTS_MAP_EXPECTED_MAX_SIZE
      See Also:
    • EMPTY_LISTENERS_ARRAY

      protected static final Consumer[] EMPTY_LISTENERS_ARRAY
    • events

      protected Map<Class<?>,Consumer[]> events
  • Constructor Details

    • EventBus

      public EventBus()
  • Method Details

    • addListener

      public <E extends EventObject> com.vaadin.flow.shared.Registration addListener(Class<E> eventType, Consumer<E> listener)
    • hasListener

      public <E extends EventObject> boolean hasListener(Class<E> eventType)
    • fireEvent

      public <E extends EventObject> void fireEvent(E event)
    • removeListener

      public <E extends EventObject> void removeListener(Class<E> eventType, Consumer<E> listener)
    • removeListener

      public <E extends EventObject> void removeListener(Class<E> eventType)
    • newListenersArray

      protected Consumer[] newListenersArray(int length)