Class SubscriberImpl<E>

    • Constructor Summary

      Constructors 
      Constructor Description
      SubscriberImpl​(@NonNull java.lang.Class<E> eventClass, @NonNull java.util.function.Consumer<E> handler, @NonNull PostOrder postOrder)  
      SubscriberImpl​(java.lang.Class<E> eventClass, PostOrder postOrder, boolean ignoreCancelled, H handlerInstance, java.util.function.BiConsumer<H,​E> handler)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @NonNull java.lang.Class<E> eventClass()
      Returns the event class.
      boolean ignoreCancelled()
      Returns if this subscription ignores cancelled events.
      void invoke​(@NonNull E event)
      Invokes a given event.
      @NonNull PostOrder order()
      Returns the post order of this event subscription.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • eventClass

        protected final java.lang.Class<E> eventClass
      • postOrder

        protected final PostOrder postOrder
      • ignoreCancelled

        protected final boolean ignoreCancelled
      • handler

        protected final java.util.function.Consumer<E> handler
    • Constructor Detail

      • SubscriberImpl

        public SubscriberImpl​(@NonNull java.lang.Class<E> eventClass,
                              @NonNull java.util.function.Consumer<E> handler,
                              @NonNull PostOrder postOrder)
      • SubscriberImpl

        public SubscriberImpl​(java.lang.Class<E> eventClass,
                              PostOrder postOrder,
                              boolean ignoreCancelled,
                              H handlerInstance,
                              java.util.function.BiConsumer<H,​E> handler)
    • Method Detail

      • eventClass

        public @NonNull java.lang.Class<E> eventClass()
        Description copied from interface: Subscriber
        Returns the event class.
        Specified by:
        eventClass in interface Subscriber<E>
      • order

        public @NonNull PostOrder order()
        Description copied from interface: Subscriber
        Returns the post order of this event subscription.
        Specified by:
        order in interface Subscriber<E>
      • ignoreCancelled

        public boolean ignoreCancelled()
        Description copied from interface: Subscriber
        Returns if this subscription ignores cancelled events.
        Specified by:
        ignoreCancelled in interface Subscriber<E>
      • invoke

        public void invoke​(@NonNull E event)
                    throws java.lang.Throwable
        Description copied from interface: Subscriber
        Invokes a given event.
        Specified by:
        invoke in interface Subscriber<E>
        Parameters:
        event - the event to invoke
        Throws:
        java.lang.Throwable