Package org.refcodes.eventbus
Class EventBusImpl
- java.lang.Object
-
- org.refcodes.eventbus.AbstractEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>
-
- org.refcodes.eventbus.EventBusImpl
-
- All Implemented Interfaces:
org.refcodes.component.HandleLookup<BusEvent,org.refcodes.observer.Observer<BusEvent>>
,DispatchStrategyAccessor
,EventBus
,GenericBusObservable<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData>
,GenericBusPublisher<BusEvent>
,GenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>
,org.refcodes.matcher.Matcher<BusEvent>
,org.refcodes.observer.EventMatcher<BusEvent>
,org.refcodes.observer.Publisher<BusEvent>
public class EventBusImpl extends AbstractEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String> implements EventBus
TheEventBusImpl
is a ready to use implementation of aEventBus
using a defaultDispatchStrategy
beingDispatchStrategy.CASCADE
and extending theAbstractEventBus
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.eventbus.DispatchStrategyAccessor
DispatchStrategyAccessor.DispatchStrategyMutator, DispatchStrategyAccessor.DispatchStrategyProperty
-
-
Constructor Summary
Constructors Constructor Description EventBusImpl()
Constructs theEventBus
with theDispatchStrategy
beingDispatchStrategy.CASCADE
when publishing events.EventBusImpl(int aCorePoolSize)
Constructs theEventBus
with theDispatchStrategy
beingDispatchStrategy.CASCADE
when publishing events.EventBusImpl(java.util.concurrent.ExecutorService aExecutorService)
Constructs theEventBus
with theDispatchStrategy
beingDispatchStrategy.CASCADE
when publishing events.EventBusImpl(DispatchStrategy aDispatchStrategy)
Constructs theEventBus
with the givenDispatchStrategy
when publishing events.EventBusImpl(DispatchStrategy aDispatchStrategy, int aCorePoolSize)
Constructs theEventBus
with the givenDispatchStrategy
when publishing events.EventBusImpl(DispatchStrategy aDispatchStrategy, java.util.concurrent.ExecutorService aExecutorService)
Constructs theEventBus
with theDispatchStrategy
beingDispatchStrategy.CASCADE
when publishing events.
-
Method Summary
-
Methods inherited from class org.refcodes.eventbus.AbstractEventBus
cascadeDispatch, getDispatchStrategy, hasHandle, isMatching, lookupHandle, parallelDispatch, publishEvent, removeHandle, sequentialDispatch, subscribe, unsubscribeAll
-
Methods inherited from interface org.refcodes.eventbus.DispatchStrategyAccessor
getDispatchStrategy
-
Methods inherited from interface org.refcodes.eventbus.EventBus
onAction, onAction, onActions, onActions, onAlias, onAlias, onCatchAll, onChannel, onChannel, onEvent, onEvent, onEvent, onEvent, onEvent, onEvent, onEvent, onEvent, onEvent, onEvent, onEvent, onEvent, onEvent, onEvent, onGroup, onGroup, onType, onUniversalId, onUniversalId, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, subscribe, subscribe
-
Methods inherited from interface org.refcodes.eventbus.GenericBusObservable
subscribe, unsubscribeAll
-
Methods inherited from interface org.refcodes.eventbus.GenericEventBus
publishEvent, publishEvent
-
-
-
-
Constructor Detail
-
EventBusImpl
public EventBusImpl()
Constructs theEventBus
with theDispatchStrategy
beingDispatchStrategy.CASCADE
when publishing events.
-
EventBusImpl
public EventBusImpl(java.util.concurrent.ExecutorService aExecutorService)
Constructs theEventBus
with theDispatchStrategy
beingDispatchStrategy.CASCADE
when publishing events.- Parameters:
aExecutorService
- THeExecutorService
to be used when creating threads.
-
EventBusImpl
public EventBusImpl(DispatchStrategy aDispatchStrategy)
Constructs theEventBus
with the givenDispatchStrategy
when publishing events.- Parameters:
aDispatchStrategy
- THeDispatchStrategy
to be used when publishing events.
-
EventBusImpl
public EventBusImpl(DispatchStrategy aDispatchStrategy, java.util.concurrent.ExecutorService aExecutorService)
Constructs theEventBus
with theDispatchStrategy
beingDispatchStrategy.CASCADE
when publishing events.- Parameters:
aDispatchStrategy
- THeDispatchStrategy
to be used when publishing events.aExecutorService
- THeExecutorService
to be used when creating threads.
-
EventBusImpl
public EventBusImpl(int aCorePoolSize)
Constructs theEventBus
with theDispatchStrategy
beingDispatchStrategy.CASCADE
when publishing events.- Parameters:
aCorePoolSize
- The number of threads to keep in the pool, even if they are idle.
-
EventBusImpl
public EventBusImpl(DispatchStrategy aDispatchStrategy, int aCorePoolSize)
Constructs theEventBus
with the givenDispatchStrategy
when publishing events.- Parameters:
aCorePoolSize
- The number of threads to keep in the pool, even if they are idle.aDispatchStrategy
- THeDispatchStrategy
to be used when publishing events.
-
-