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 Summary

    Modifier and Type
    Method
    Description
    @NonNull Class<T>
    Returns the event class.
    boolean
    Returns if this subscription ignores cancelled events.
    void
    invoke(@NonNull T event)
    Invokes a given event.
    @NonNull PostOrder
    Returns the post order of this event subscription.
  • Method Details

    • eventClass

      @NonNull 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 Throwable
      Invokes a given event.
      Parameters:
      event - the event to invoke
      Throws:
      Throwable