Interface Subscriber<T>

  • Type Parameters:
    T - the class of the event
    All Known Subinterfaces:
    OwnedSubscriber<O,​T>
    All Known Implementing Classes:
    OwnedSubscriberImpl, SubscriberImpl

    public interface Subscriber<T>
    Represents a subscribed listener to an event. Wraps around the event and is capable of unsubscribing from the event or give information about it.
    • Method Detail

      • eventClass

        @NonNull java.lang.Class<T> eventClass()
        Returns the event class.
      • order

        @NonNull PostOrder order()
        Returns the post order of this event subscription.
      • ignoreCancelled

        boolean ignoreCancelled()
        Returns if this subscription ignores cancelled events.
      • invoke

        void invoke​(@NonNull T event)
             throws java.lang.Throwable
        Invokes a given event.
        Parameters:
        event - the event to invoke
        Throws:
        java.lang.Throwable