Interface BaseBus<E,S extends Subscriber<? extends E>>

All Known Subinterfaces:
EventBus<E,S>, OwnedEventBus<O,E,S>
All Known Implementing Classes:
EventBusImpl, OwnedEventBusImpl

public interface BaseBus<E,S extends Subscriber<? extends E>>
  • Method Summary

    Modifier and Type
    Method
    Description
    fire(@NonNull E event)
    Fires the given event and log all exceptions that occur while executing this event.
    fireSilently(@NonNull E event)
    Fires the given event silently.
    <T extends E>
    @NonNull Set<? extends Subscriber<T>>
    subscribers(@NonNull Class<T> eventClass)
    Gets the subscriptions for the given event class.
    void
    unsubscribe(@NonNull S subscription)
    Unsubscribes the given Subscriber.
  • Method Details

    • unsubscribe

      void unsubscribe(@NonNull S subscription)
      Unsubscribes the given Subscriber.
      Parameters:
      subscription - the event subscription
    • fire

      FireResult fire(@NonNull E event)
      Fires the given event and log all exceptions that occur while executing this event.
      Parameters:
      event - the event to fire
    • fireSilently

      FireResult fireSilently(@NonNull E event)
      Fires the given event silently.
      Parameters:
      event - the event to fire
      Returns:
      the result of firing the given event
    • subscribers

      <T extends E> @NonNull Set<? extends Subscriber<T>> subscribers(@NonNull Class<T> eventClass)
      Gets the subscriptions for the given event class.
      Type Parameters:
      T - the value
      Parameters:
      eventClass - the event class
      Returns:
      the subscriptions for the event class