Class SubscriberImpl<E>
- java.lang.Object
-
- org.geysermc.event.subscribe.impl.SubscriberImpl<E>
-
- All Implemented Interfaces:
Subscriber<E>
- Direct Known Subclasses:
OwnedSubscriberImpl
public abstract class SubscriberImpl<E> extends java.lang.Object implements Subscriber<E>
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Class<E>eventClassprotected java.util.function.Consumer<E>handlerprotected booleanignoreCancelledprotected PostOrderpostOrder
-
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.booleanignoreCancelled()Returns if this subscription ignores cancelled events.voidinvoke(@NonNull E event)Invokes a given event.@NonNull PostOrderorder()Returns the post order of this event subscription.
-
-
-
Method Detail
-
eventClass
public @NonNull java.lang.Class<E> eventClass()
Description copied from interface:SubscriberReturns the event class.- Specified by:
eventClassin interfaceSubscriber<E>
-
order
public @NonNull PostOrder order()
Description copied from interface:SubscriberReturns the post order of this event subscription.- Specified by:
orderin interfaceSubscriber<E>
-
ignoreCancelled
public boolean ignoreCancelled()
Description copied from interface:SubscriberReturns if this subscription ignores cancelled events.- Specified by:
ignoreCancelledin interfaceSubscriber<E>
-
invoke
public void invoke(@NonNull E event) throws java.lang.Throwable
Description copied from interface:SubscriberInvokes a given event.- Specified by:
invokein interfaceSubscriber<E>- Parameters:
event- the event to invoke- Throws:
java.lang.Throwable
-
-