E - the event type@FunctionalInterface
public interface EventSubscriber<E>
| Modifier and Type | Method and Description |
|---|---|
default boolean |
consumeCancelledEvents()
Gets if cancelled events should be posted to this subscriber.
|
default @Nullable java.lang.reflect.Type |
genericType()
Gets the generic type of this subscriber, if it is known.
|
void |
invoke(E event)
Invokes this event subscriber.
|
default int |
postOrder()
Gets the post order this subscriber should be called at.
|
void invoke(E event) throws java.lang.Throwable
Called by the event bus when a new event is "posted" to this subscriber.
event - the event that was postedjava.lang.Throwable - any exception thrown during handlingdefault int postOrder()
PostOrdersdefault boolean consumeCancelledEvents()
default @Nullable java.lang.reflect.Type genericType()