- java.lang.Object
-
- com.seiama.event.bus.SimpleEventBus<E>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.seiama.event.bus.EventBus
EventBus.EventExceptionHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected EventBus.EventExceptionHandlerexceptionsprotected EventRegistry<E>registry
-
Constructor Summary
Constructors Constructor Description SimpleEventBus(@NotNull EventRegistry<E> registry, EventBus.EventExceptionHandler exceptions)Constructs a newSimpleEventBus.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanaccepts(@NotNull EventSubscription<? super E> subscription, E event, @NotNull OptionalInt order)voidpost(E event, @NotNull OptionalInt order)Posts an event to all registered subscribers at the order provided inorder.
-
-
-
Field Detail
-
registry
protected final EventRegistry<E> registry
-
exceptions
protected final EventBus.EventExceptionHandler exceptions
-
-
Constructor Detail
-
SimpleEventBus
public SimpleEventBus(@NotNull @NotNull EventRegistry<E> registry, @NotNull EventBus.EventExceptionHandler exceptions)Constructs a newSimpleEventBus.- Parameters:
registry- the event registryexceptions- the event exception handler- Since:
- 1.0.0
-
-
Method Detail
-
post
public void post(@NotNull E event, @NotNull @NotNull OptionalInt order)Description copied from interface:EventBusPosts an event to all registered subscribers at the order provided inorder.
-
accepts
protected boolean accepts(@NotNull @NotNull EventSubscription<? super E> subscription, @NotNull E event, @NotNull @NotNull OptionalInt order)
-
-