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

    • Method Detail

      • 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 java.util.Set<? extends Subscriber<T>> subscribers​(@NonNull java.lang.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