Uses of Class
org.refcodes.eventbus.EventBus
-
Uses of EventBus in org.refcodes.eventbus
Modifier and TypeMethodDescriptionstatic EventBus
EventBusSugar.asyncDispatchBus()
Constructs theEventBus
with theDispatchStrategy.ASYNC
when publishing events: Same as theDispatchStrategy.SEQUENTIAL
approach with the difference that the sequential dispatch process is done asynchronously, freeing your parent's thread immediately after publishing your parent event.static EventBus
EventBusSugar.asyncDispatchBus
(boolean isDaemon) Constructs theEventBus
with theDispatchStrategy.ASYNC
when publishing events: Same as theDispatchStrategy.SEQUENTIAL
approach with the difference that the sequential dispatch process is done asynchronously, freeing your parent's thread immediately after publishing your parent event.static EventBus
EventBusSugar.cascadeDispatchBus()
Constructs theEventBus
with theDispatchStrategy.CASCADE
when publishing events: The parent (invoker) thread is used to publish the parent's event to all matching observers (and is blocked till done).static EventBus
EventBusSugar.cascadeDispatchBus
(boolean isDaemon) Constructs theEventBus
with theDispatchStrategy.CASCADE
when publishing events: The parent (invoker) thread is used to publish the parent's event to all matching observers (and is blocked till done).static EventBus
EventBusSugar.eventBus()
static EventBus
EventBusSugar.eventBus
(boolean isDaemon) static EventBus
EventBusSugar.parallelDispatchBus()
Constructs theEventBus
with theDispatchStrategy.PARALLEL
when publishing events: Each matching observer is invoked in its own thread.static EventBus
EventBusSugar.parallelDispatchBus
(boolean isDaemon) Constructs theEventBus
with theDispatchStrategy.PARALLEL
when publishing events: Each matching observer is invoked in its own thread.static EventBus
EventBusSugar.sequentialDispatchBus()
Constructs theEventBus
with theDispatchStrategy.SEQUENTIAL
when publishing events: The parent (invoker) thread is used to publish the parent's event as well as the child events published by the matching observers of the parent event (and so on, in case them useDispatchStrategy.SEQUENTIAL
as well).static EventBus
EventBusSugar.sequentialDispatchBus
(boolean isDaemon) Constructs theEventBus
with theDispatchStrategy.SEQUENTIAL
when publishing events: The parent (invoker) thread is used to publish the parent's event as well as the child events published by the matching observers of the parent event (and so on, in case them useDispatchStrategy.SEQUENTIAL
as well).ModifierConstructorDescriptionEventBusEvent
(Class<?> aPublisherType, EventBus aSource) Constructs an event with predefined values for the according properties retrieved from the caller's class.EventBusEvent
(Enum<?> aAction, Class<?> aPublisherType, EventBus aSource) Constructs an event with predefined values for the according properties retrieved from the caller's class.EventBusEvent
(Enum<?> aAction, String aChannel, Class<?> aPublisherType, EventBus aSource) Constructs an event with predefined values for the according properties retrieved from the caller's class.EventBusEvent
(Enum<?> aAction, String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, EventBus aSource) Constructs an event with the given values for the according properties.EventBusEvent
(Enum<?> aAction, String aChannel, EventBus aSource) Constructs an event with predefined values for the according properties retrieved from the caller's class.EventBusEvent
(Enum<?> aAction, EventBus aSource) Constructs an event with the given Meta-Data.EventBusEvent
(Enum<?> aAction, org.refcodes.observer.EventMetaData aEventMetaData, EventBus aSource) Constructs an event with the given Meta-Data.EventBusEvent
(String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, EventBus aSource) Constructs an event with the given values for the according properties.EventBusEvent
(String aChannel, EventBus aSource) Constructs an event with predefined values for the according properties retrieved from the caller's class.EventBusEvent
(EventBus aSource) Constructs an event with the given Meta-Data.EventBusEvent
(org.refcodes.observer.EventMetaData aEventMetaData, EventBus aSource) Constructs an event with the given Meta-Data.