Class ApplicationBus
java.lang.Object
org.refcodes.eventbus.AbstractEventBus<ApplicationBusEvent,org.refcodes.observer.Observer<ApplicationBusEvent>,ApplicationEventMatcher,org.refcodes.mixin.EventMetaData,String>
org.refcodes.eventbus.ext.application.ApplicationBus
- All Implemented Interfaces:
Destroyable
,org.refcodes.component.Destroyable
,org.refcodes.component.Destroyable.DestroyAutomaton
,org.refcodes.component.HandleLookup<String,
,org.refcodes.observer.Observer<ApplicationBusEvent>> org.refcodes.component.Initializable
,org.refcodes.component.Initializable.InitializeAutomaton
,org.refcodes.component.InitializedAccessor
,org.refcodes.component.LifecycleComponent
,org.refcodes.component.LifecycleComponent.LifecycleAutomaton
,org.refcodes.component.LifecycleStatusAccessor
,org.refcodes.component.Pausable
,org.refcodes.component.Pausable.PauseAutomaton
,org.refcodes.component.Resumable
,org.refcodes.component.Resumable.ResumeAutomaton
,org.refcodes.component.RunningAccessor
,org.refcodes.component.Startable
,org.refcodes.component.Startable.StartAutomaton
,org.refcodes.component.Stoppable
,org.refcodes.component.Stoppable.StopAutomaton
,org.refcodes.eventbus.DispatchStrategyAccessor
,org.refcodes.eventbus.EventBusObservable<ApplicationBusEvent,
,org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, String> org.refcodes.eventbus.EventBusPublisher<ApplicationBusEvent>
,DestroyBus
,ExceptionBus
,InitializeBus
,LifecycleBus
,MessageBus
,PauseBus
,PayloadBus
,PropertiesBus
,ResumeBus
,StartBus
,StopBus
,org.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
,org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String> org.refcodes.matcher.Matchable<ApplicationBusEvent>
,org.refcodes.observer.Publisher<ApplicationBusEvent>
public class ApplicationBus
extends org.refcodes.eventbus.AbstractEventBus<ApplicationBusEvent,org.refcodes.observer.Observer<ApplicationBusEvent>,ApplicationEventMatcher,org.refcodes.mixin.EventMetaData,String>
implements org.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,org.refcodes.observer.Observer<ApplicationBusEvent>,ApplicationEventMatcher,org.refcodes.mixin.EventMetaData,String>, PayloadBus, PropertiesBus, MessageBus, ExceptionBus, LifecycleBus
The
ApplicationBus
extends the GenericEventBus
with
convenience functionality common to everyday application and service
development as defined by the interfaces PayloadBus
,
PropertiesBus
, MessageBus
, ExceptionBus
as well as
LifecycleBus
on top of the GenericEventBus
. To ensure
controlled LifecycleBusObserver
bootstrapping (subscribed via
LifecycleBus.onLifecycle(LifecycleBusObserver)
and the like), the
InitializeBusEvent
instances fired upon calls to methods such as
InitializeBus.publishInitialize(Properties)
(and the like) are (if not stated
otherwise) dispatched with the DispatchStrategy.CASCADE
strategy.
Same applies to service "shutdown" as of PauseBus.publishPause()
,
StopBus.publishStop()
or DestroyBus.publishDestroy()
(and the like) which are
also dispatched by default with the DispatchStrategy.CASCADE
strategy. This means that the observer methods
LifecycleBusObserver.onInitialize(InitializeBusEvent)
,
LifecycleBusObserver.onPause(PauseBusEvent)
,
LifecycleBusObserver.onStop(StopBusEvent)
and
LifecycleBusObserver.onDestroy(DestroyBusEvent)
must exit the
invoking thread as soon as possible so not to block succeeding listener
methods. As initialization is processed in a controlled manner (as mentioned
above), starting or resuming the LifecycleBusObserver
instances is
done with the DispatchStrategy.PARALLEL
as we enter normal operation.
This means that the observer methods
LifecycleBusObserver.onStart(StartBusEvent)
and
LifecycleBusObserver.onResume(ResumeBusEvent)
do not need to exit the
invoking thread as they cannot block succeeding listener methods.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.component.Destroyable
org.refcodes.component.Destroyable.DestroyAutomaton
Nested classes/interfaces inherited from interface org.refcodes.eventbus.DispatchStrategyAccessor
org.refcodes.eventbus.DispatchStrategyAccessor.DispatchStrategyMutator, org.refcodes.eventbus.DispatchStrategyAccessor.DispatchStrategyProperty
Nested classes/interfaces inherited from interface org.refcodes.component.Initializable
org.refcodes.component.Initializable.InitializeAutomaton, org.refcodes.component.Initializable.InitializeBuilder<B extends org.refcodes.component.Initializable.InitializeBuilder<B>>, org.refcodes.component.Initializable.UncheckedInitializable
Nested classes/interfaces inherited from interface org.refcodes.component.InitializedAccessor
org.refcodes.component.InitializedAccessor.InitializedMutator, org.refcodes.component.InitializedAccessor.InitializedProperty
Nested classes/interfaces inherited from interface org.refcodes.component.LifecycleComponent
org.refcodes.component.LifecycleComponent.LifecycleAutomaton, org.refcodes.component.LifecycleComponent.UncheckedLifecycleComponent
Nested classes/interfaces inherited from interface org.refcodes.component.LifecycleStatusAccessor
org.refcodes.component.LifecycleStatusAccessor.LifecycleStatusBuilder<B extends org.refcodes.component.LifecycleStatusAccessor.LifecycleStatusBuilder<B>>, org.refcodes.component.LifecycleStatusAccessor.LifecycleStatusMutator, org.refcodes.component.LifecycleStatusAccessor.LifecycleStatusProperty
Nested classes/interfaces inherited from interface org.refcodes.component.Pausable
org.refcodes.component.Pausable.PauseAutomaton, org.refcodes.component.Pausable.PauseBuilder<B extends org.refcodes.component.Pausable.PauseBuilder<B>>, org.refcodes.component.Pausable.UncheckedPausable
Nested classes/interfaces inherited from interface org.refcodes.component.Resumable
org.refcodes.component.Resumable.ResumeAutomaton, org.refcodes.component.Resumable.ResumeBuilder<B extends org.refcodes.component.Resumable.ResumeBuilder<B>>, org.refcodes.component.Resumable.UncheckedResumable
Nested classes/interfaces inherited from interface org.refcodes.component.RunningAccessor
org.refcodes.component.RunningAccessor.RunningMutator, org.refcodes.component.RunningAccessor.RunningProperty
Nested classes/interfaces inherited from interface org.refcodes.component.Startable
org.refcodes.component.Startable.StartAutomaton, org.refcodes.component.Startable.StartBuilder<B extends org.refcodes.component.Startable.StartBuilder<B>>, org.refcodes.component.Startable.UncheckedStartable
Nested classes/interfaces inherited from interface org.refcodes.component.Stoppable
org.refcodes.component.Stoppable.StopAutomaton, org.refcodes.component.Stoppable.StopBuilder<B extends org.refcodes.component.Stoppable.StopBuilder<B>>, org.refcodes.component.Stoppable.UncheckedStoppable
-
Constructor Summary
ConstructorDescriptionConstructs theApplicationBus
with theDispatchStrategy
beingDispatchStrategy.CASCADE
when publishing events.ApplicationBus
(boolean isDaemon) Constructs theApplicationBus
with theDispatchStrategy
beingDispatchStrategy.CASCADE
when publishing events.ApplicationBus
(ExecutorService aExecutorService) Constructs theApplicationBus
with theDispatchStrategy
beingDispatchStrategy.CASCADE
when publishing events.ApplicationBus
(org.refcodes.eventbus.DispatchStrategy aDispatchStrategy) Constructs theApplicationBus
with the givenDispatchStrategy
when publishing events.ApplicationBus
(org.refcodes.eventbus.DispatchStrategy aDispatchStrategy, boolean isDaemon) Constructs theApplicationBus
with the givenDispatchStrategy
when publishing events.ApplicationBus
(org.refcodes.eventbus.DispatchStrategy aDispatchStrategy, ExecutorService aExecutorService) Constructs theApplicationBus
with theDispatchStrategy
beingDispatchStrategy.CASCADE
when publishing events. -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Destroys theApplicationBus
after having invokedDestroyBus.publishDestroy()
.void
destroy
(org.refcodes.eventbus.DispatchStrategy aStrategy) Destroys theApplicationBus
after having invokedDestroyBus.publishDestroy(DispatchStrategy)
similar to thedestroy()
method, though using the providedDispatchStrategy
.org.refcodes.component.LifecycleStatus
void
Initializes theApplicationBus
after having invokedInitializeBus.publishInitialize()
.void
initialize
(org.refcodes.eventbus.DispatchStrategy aStrategy) Initializes theApplicationBus
after having invokedInitializeBus.publishInitialize(DispatchStrategy)
similar to theinitialize()
method, though using the providedDispatchStrategy
.boolean
boolean
boolean
boolean
boolean
boolean
isPaused()
boolean
boolean
boolean
boolean
boolean
onAction
(Class<ApplicationBusEvent> aEventType, Enum<?> aAction, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) onAction
(Enum<?> aAction, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) onActions
(Class<ApplicationBusEvent> aEventType, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver, Enum<?>... aActions) onActions
(org.refcodes.observer.Observer<ApplicationBusEvent> aObserver, Enum<?>... aActions) onAlias
(Class<ApplicationBusEvent> aEventType, String aName, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) onAlias
(String aName, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) onCatchAll
(org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) onChannel
(Class<ApplicationBusEvent> aEventType, String aChannel, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) onChannel
(String aChannel, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) onEvent
(Class<?> aPublisherType, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) onEvent
(Class<ApplicationBusEvent> aEventType, Class<?> aPublisherType, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) onEvent
(Class<ApplicationBusEvent> aEventType, Enum<?> aAction, Class<?> aPublisherType, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) onEvent
(Class<ApplicationBusEvent> aEventType, Enum<?> aAction, String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) onEvent
(Class<ApplicationBusEvent> aEventType, Enum<?> aAction, String aChannel, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) onEvent
(Class<ApplicationBusEvent> aEventType, Enum<?> aAction, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) onEvent
(Class<ApplicationBusEvent> aEventType, String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) onEvent
(Class<ApplicationBusEvent> aEventType, String aChannel, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) onEvent
(Enum<?> aAction, Class<?> aPublisherType, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) onEvent
(Enum<?> aAction, String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) onEvent
(Enum<?> aAction, String aChannel, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) onEvent
(Enum<?> aAction, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) onEvent
(String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) onEvent
(String aChannel, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) onGroup
(Class<ApplicationBusEvent> aEventType, String aGroup, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) onGroup
(String aGroup, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) <EVT extends ApplicationBusEvent>
StringonUniversalId
(Class<ApplicationBusEvent> aEventType, String aUid, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) onUniversalId
(String aUid, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) void
pause()
Pauses theApplicationBus
after having invokedPauseBus.publishPause()
.void
pause
(org.refcodes.eventbus.DispatchStrategy aStrategy) Pauses theApplicationBus
after having invokedPauseBus.publishPause(DispatchStrategy)
similar to thepause()
method, though using the providedDispatchStrategy
.void
publishEvent
(Class<?> aPublisherType) void
publishEvent
(Class<?> aPublisherType, org.refcodes.eventbus.DispatchStrategy aStrategy) void
publishEvent
(Enum<?> aAction) void
publishEvent
(Enum<?> aAction, Class<?> aPublisherType) void
publishEvent
(Enum<?> aAction, Class<?> aPublisherType, org.refcodes.eventbus.DispatchStrategy aStrategy) void
publishEvent
(Enum<?> aAction, String aChannel) void
publishEvent
(Enum<?> aAction, String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType) void
publishEvent
(Enum<?> aAction, String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, org.refcodes.eventbus.DispatchStrategy aStrategy) void
publishEvent
(Enum<?> aAction, String aChannel, org.refcodes.eventbus.DispatchStrategy aStrategy) void
publishEvent
(Enum<?> aAction, org.refcodes.eventbus.DispatchStrategy aStrategy) void
publishEvent
(Enum<?> aAction, org.refcodes.mixin.EventMetaData aEventMetaData) void
publishEvent
(Enum<?> aAction, org.refcodes.mixin.EventMetaData aEventMetaData, org.refcodes.eventbus.DispatchStrategy aStrategy) void
publishEvent
(String aChannel) void
void
publishEvent
(String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, org.refcodes.eventbus.DispatchStrategy aStrategy) void
publishEvent
(String aChannel, org.refcodes.eventbus.DispatchStrategy aStrategy) void
publishEvent
(org.refcodes.eventbus.DispatchStrategy aStrategy) void
publishEvent
(org.refcodes.mixin.EventMetaData aEventMetaData) void
publishEvent
(org.refcodes.mixin.EventMetaData aEventMetaData, org.refcodes.eventbus.DispatchStrategy aStrategy) void
resume()
Resumes theApplicationBus
after having invokedResumeBus.publishResume()
.void
resume
(org.refcodes.eventbus.DispatchStrategy aStrategy) Resumes theApplicationBus
after having invokedResumeBus.publishResume(DispatchStrategy)
similar to thepause()
method, though using the providedDispatchStrategy
.void
start()
Starts theApplicationBus
after having invokedStartBus.publishStart()
.void
start
(org.refcodes.eventbus.DispatchStrategy aStrategy) Starts theApplicationBus
after having invokedStartBus.publishStart(DispatchStrategy)
similar to thepause()
method, though using the providedDispatchStrategy
.void
stop()
Stops theApplicationBus
after having invokedStopBus.publishStop()
.void
stop
(org.refcodes.eventbus.DispatchStrategy aStrategy) Stops theApplicationBus
after having invokedStopBus.publishStop(DispatchStrategy)
similar to thepause()
method, though using the providedDispatchStrategy
.<EVT extends ApplicationBusEvent>
Stringsubscribe
(Class<EVT> aEventType, ApplicationEventMatcher aEventMatcher, org.refcodes.observer.Observer<EVT> aObserver) <EVT extends ApplicationBusEvent>
StringMethods inherited from class org.refcodes.eventbus.AbstractEventBus
cascadeDispatch, getDispatchStrategy, hasHandle, isMatching, lookupHandle, parallelDispatch, publishEvent, removeHandle, sequentialDispatch, subscribe, unsubscribeAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.refcodes.eventbus.ext.application.DestroyBus
onDestroy, onDestroy, onDestroy, onDestroy, onDestroy, onDestroy, onDestroy, onDestroy, publishDestroy, publishDestroy, publishDestroy, publishDestroy, publishDestroy, publishDestroy, publishDestroy, publishDestroy, publishDestroy, publishDestroy
Methods inherited from interface org.refcodes.eventbus.DispatchStrategyAccessor
getDispatchStrategy
Methods inherited from interface org.refcodes.eventbus.EventBusObservable
subscribe, unsubscribeAll
Methods inherited from interface org.refcodes.eventbus.ext.application.ExceptionBus
onException, onException, onException, onException, onException, onException, onException, onException, publishException, publishException, publishException, publishException, publishException, publishException, publishException, publishException, publishException, publishException, publishException, publishException, publishException, publishException, publishException, publishException, publishException, publishException, publishException, publishException
Methods inherited from interface org.refcodes.eventbus.GenericEventBus
publishEvent, publishEvent
Methods inherited from interface org.refcodes.component.HandleLookup
hasHandle, lookupHandle, removeHandle
Methods inherited from interface org.refcodes.component.Initializable
initializeUnchecked
Methods inherited from interface org.refcodes.eventbus.ext.application.InitializeBus
onInitialize, onInitialize, onInitialize, onInitialize, onInitialize, onInitialize, onInitialize, onInitialize, publishInitialize, publishInitialize, publishInitialize, publishInitialize, publishInitialize, publishInitialize, publishInitialize, publishInitialize, publishInitialize, publishInitialize, publishInitialize, publishInitialize, publishInitialize, publishInitialize, publishInitialize, publishInitialize, publishInitialize, publishInitialize, publishInitialize, publishInitialize
Methods inherited from interface org.refcodes.eventbus.ext.application.LifecycleBus
onLifecycle, onLifecycle, onLifecycle, onLifecycle, onLifecycle, onLifecycle, onLifecycle, onLifecycle
Methods inherited from interface org.refcodes.matcher.Matchable
isMatching
Methods inherited from interface org.refcodes.eventbus.ext.application.MessageBus
onMessage, onMessage, onMessage, onMessage, onMessage, onMessage, onMessage, onMessage, publishMessage, publishMessage, publishMessage, publishMessage, publishMessage, publishMessage, publishMessage, publishMessage, publishMessage, publishMessage, publishMessage, publishMessage, publishMessage, publishMessage, publishMessage, publishMessage, publishMessage, publishMessage, publishMessage, publishMessage
Methods inherited from interface org.refcodes.component.Pausable
pauseUnchecked
Methods inherited from interface org.refcodes.eventbus.ext.application.PauseBus
onPause, onPause, onPause, onPause, onPause, onPause, onPause, onPause, publishPause, publishPause, publishPause, publishPause, publishPause, publishPause, publishPause, publishPause, publishPause, publishPause
Methods inherited from interface org.refcodes.eventbus.ext.application.PayloadBus
onPayload, onPayload, onPayload, onPayload, onPayload, onPayload, onPayload, onPayload, publishPayload, publishPayload, publishPayload, publishPayload, publishPayload, publishPayload, publishPayload, publishPayload, publishPayload, publishPayload, publishPayload, publishPayload, publishPayload, publishPayload, publishPayload, publishPayload, publishPayload, publishPayload, publishPayload, publishPayload
Methods inherited from interface org.refcodes.eventbus.ext.application.PropertiesBus
onProperties, onProperties, onProperties, onProperties, onProperties, onProperties, onProperties, onProperties, publishProperties, publishProperties, publishProperties, publishProperties, publishProperties, publishProperties, publishProperties, publishProperties, publishProperties, publishProperties, publishProperties, publishProperties, publishProperties, publishProperties, publishProperties, publishProperties, publishProperties, publishProperties, publishProperties, publishProperties
Methods inherited from interface org.refcodes.component.Resumable
resumeUnchecked
Methods inherited from interface org.refcodes.eventbus.ext.application.ResumeBus
onResume, onResume, onResume, onResume, onResume, onResume, onResume, onResume, publishResume, publishResume, publishResume, publishResume, publishResume, publishResume, publishResume, publishResume, publishResume, publishResume
Methods inherited from interface org.refcodes.component.Startable
startUnchecked
Methods inherited from interface org.refcodes.eventbus.ext.application.StartBus
onStart, onStart, onStart, onStart, onStart, onStart, onStart, onStart, publishStart, publishStart, publishStart, publishStart, publishStart, publishStart, publishStart, publishStart, publishStart, publishStart
Methods inherited from interface org.refcodes.eventbus.ext.application.StopBus
onStop, onStop, onStop, onStop, onStop, onStop, onStop, onStop, publishStop, publishStop, publishStop, publishStop, publishStop, publishStop, publishStop, publishStop, publishStop, publishStop
Methods inherited from interface org.refcodes.component.Stoppable
stopUnchecked
-
Constructor Details
-
ApplicationBus
public ApplicationBus()Constructs theApplicationBus
with theDispatchStrategy
beingDispatchStrategy.CASCADE
when publishing events. -
ApplicationBus
public ApplicationBus(boolean isDaemon) Constructs theApplicationBus
with theDispatchStrategy
beingDispatchStrategy.CASCADE
when publishing events. -
ApplicationBus
Constructs theApplicationBus
with theDispatchStrategy
beingDispatchStrategy.CASCADE
when publishing events.- Parameters:
aExecutorService
- TheExecutorService
to be used when creating threads.
-
ApplicationBus
public ApplicationBus(org.refcodes.eventbus.DispatchStrategy aDispatchStrategy) Constructs theApplicationBus
with the givenDispatchStrategy
when publishing events.- Parameters:
aDispatchStrategy
- TheDispatchStrategy
to be used when publishing events.
-
ApplicationBus
public ApplicationBus(org.refcodes.eventbus.DispatchStrategy aDispatchStrategy, boolean isDaemon) Constructs theApplicationBus
with the givenDispatchStrategy
when publishing events. -
ApplicationBus
public ApplicationBus(org.refcodes.eventbus.DispatchStrategy aDispatchStrategy, ExecutorService aExecutorService) Constructs theApplicationBus
with theDispatchStrategy
beingDispatchStrategy.CASCADE
when publishing events.- Parameters:
aDispatchStrategy
- TheDispatchStrategy
to be used when publishing events.aExecutorService
- TheExecutorService
to be used when creating threads.
-
-
Method Details
-
isDestroyable
public boolean isDestroyable()- Specified by:
isDestroyable
in interfaceorg.refcodes.component.Destroyable.DestroyAutomaton
-
isDestroyed
public boolean isDestroyed()- Specified by:
isDestroyed
in interfaceDestroyable
- Specified by:
isDestroyed
in interfaceorg.refcodes.component.Destroyable.DestroyAutomaton
-
isInitalizable
public boolean isInitalizable()- Specified by:
isInitalizable
in interfaceorg.refcodes.component.Initializable.InitializeAutomaton
-
isInitialized
public boolean isInitialized()- Specified by:
isInitialized
in interfaceorg.refcodes.component.InitializedAccessor
-
isPausable
public boolean isPausable()- Specified by:
isPausable
in interfaceorg.refcodes.component.Pausable.PauseAutomaton
-
isPaused
public boolean isPaused()- Specified by:
isPaused
in interfaceorg.refcodes.component.Pausable.PauseAutomaton
-
isResumable
public boolean isResumable()- Specified by:
isResumable
in interfaceorg.refcodes.component.Resumable.ResumeAutomaton
-
isRunning
public boolean isRunning()- Specified by:
isRunning
in interfaceorg.refcodes.component.RunningAccessor
-
isStartable
public boolean isStartable()- Specified by:
isStartable
in interfaceorg.refcodes.component.Startable.StartAutomaton
-
isStoppable
public boolean isStoppable()- Specified by:
isStoppable
in interfaceorg.refcodes.component.Stoppable.StopAutomaton
-
isStopped
public boolean isStopped()- Specified by:
isStopped
in interfaceorg.refcodes.component.Stoppable.StopAutomaton
-
destroy
public void destroy()Destroys theApplicationBus
after having invokedDestroyBus.publishDestroy()
.- Specified by:
destroy
in interfaceDestroyable
- Specified by:
destroy
in interfaceorg.refcodes.component.Destroyable
- Overrides:
destroy
in classorg.refcodes.eventbus.AbstractEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
destroy
public void destroy(org.refcodes.eventbus.DispatchStrategy aStrategy) Destroys theApplicationBus
after having invokedDestroyBus.publishDestroy(DispatchStrategy)
similar to thedestroy()
method, though using the providedDispatchStrategy
.- Parameters:
aStrategy
- aStrategy TheDispatchStrategy
to use when dispatching the according event.
-
initialize
public void initialize() throws org.refcodes.component.InitializeExceptionInitializes theApplicationBus
after having invokedInitializeBus.publishInitialize()
.- Specified by:
initialize
in interfaceorg.refcodes.component.Initializable
- Throws:
org.refcodes.component.InitializeException
-
initialize
public void initialize(org.refcodes.eventbus.DispatchStrategy aStrategy) throws org.refcodes.component.InitializeException Initializes theApplicationBus
after having invokedInitializeBus.publishInitialize(DispatchStrategy)
similar to theinitialize()
method, though using the providedDispatchStrategy
.- Parameters:
aStrategy
- aStrategy TheDispatchStrategy
to use when dispatching the according event.- Throws:
org.refcodes.component.InitializeException
- thrown in case initializing a component caused problems.
-
pause
public void pause() throws org.refcodes.component.PauseExceptionPauses theApplicationBus
after having invokedPauseBus.publishPause()
.- Specified by:
pause
in interfaceorg.refcodes.component.Pausable
- Throws:
org.refcodes.component.PauseException
-
pause
public void pause(org.refcodes.eventbus.DispatchStrategy aStrategy) throws org.refcodes.component.PauseException Pauses theApplicationBus
after having invokedPauseBus.publishPause(DispatchStrategy)
similar to thepause()
method, though using the providedDispatchStrategy
.- Parameters:
aStrategy
- aStrategy TheDispatchStrategy
to use when dispatching the according event.- Throws:
org.refcodes.component.PauseException
- thrown in case pausing a component caused problems.
-
resume
public void resume() throws org.refcodes.component.ResumeExceptionResumes theApplicationBus
after having invokedResumeBus.publishResume()
.- Specified by:
resume
in interfaceorg.refcodes.component.Resumable
- Throws:
org.refcodes.component.ResumeException
-
resume
public void resume(org.refcodes.eventbus.DispatchStrategy aStrategy) throws org.refcodes.component.ResumeException Resumes theApplicationBus
after having invokedResumeBus.publishResume(DispatchStrategy)
similar to thepause()
method, though using the providedDispatchStrategy
.- Parameters:
aStrategy
- aStrategy TheDispatchStrategy
to use when dispatching the according event.- Throws:
org.refcodes.component.ResumeException
- thrown in case pausing a component caused problems.
-
start
public void start() throws org.refcodes.component.StartExceptionStarts theApplicationBus
after having invokedStartBus.publishStart()
.- Specified by:
start
in interfaceorg.refcodes.component.Startable
- Throws:
org.refcodes.component.StartException
-
start
public void start(org.refcodes.eventbus.DispatchStrategy aStrategy) throws org.refcodes.component.StartException Starts theApplicationBus
after having invokedStartBus.publishStart(DispatchStrategy)
similar to thepause()
method, though using the providedDispatchStrategy
.- Parameters:
aStrategy
- aStrategy TheDispatchStrategy
to use when dispatching the according event.- Throws:
org.refcodes.component.StartException
- thrown in case pausing a component caused problems.
-
stop
public void stop() throws org.refcodes.component.StopExceptionStops theApplicationBus
after having invokedStopBus.publishStop()
.- Specified by:
stop
in interfaceorg.refcodes.component.Stoppable
- Throws:
org.refcodes.component.StopException
-
stop
public void stop(org.refcodes.eventbus.DispatchStrategy aStrategy) throws org.refcodes.component.StopException Stops theApplicationBus
after having invokedStopBus.publishStop(DispatchStrategy)
similar to thepause()
method, though using the providedDispatchStrategy
.- Parameters:
aStrategy
- aStrategy TheDispatchStrategy
to use when dispatching the according event.- Throws:
org.refcodes.component.StopException
- thrown in case pausing a component caused problems.
-
getLifecycleStatus
public org.refcodes.component.LifecycleStatus getLifecycleStatus()- Specified by:
getLifecycleStatus
in interfaceorg.refcodes.component.LifecycleStatusAccessor
-
onAlias
- Specified by:
onAlias
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onChannel
public String onChannel(String aChannel, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) - Specified by:
onChannel
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onGroup
- Specified by:
onGroup
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onUniversalId
public String onUniversalId(String aUid, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) - Specified by:
onUniversalId
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onAction
public String onAction(Enum<?> aAction, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) - Specified by:
onAction
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onActions
public String onActions(org.refcodes.observer.Observer<ApplicationBusEvent> aObserver, Enum<?>... aActions) - Specified by:
onActions
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onCatchAll
- Specified by:
onCatchAll
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onEvent
public String onEvent(Class<?> aPublisherType, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) - Specified by:
onEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onEvent
public String onEvent(String aChannel, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) - Specified by:
onEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onEvent
public String onEvent(String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) - Specified by:
onEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onEvent
public String onEvent(Enum<?> aAction, Class<?> aPublisherType, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) - Specified by:
onEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onEvent
public String onEvent(Enum<?> aAction, String aChannel, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) - Specified by:
onEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onEvent
public String onEvent(Enum<?> aAction, String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) - Specified by:
onEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onEvent
public String onEvent(Enum<?> aAction, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) - Specified by:
onEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onEvent
public String onEvent(Class<ApplicationBusEvent> aEventType, Class<?> aPublisherType, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) - Specified by:
onEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onEvent
public String onEvent(Class<ApplicationBusEvent> aEventType, String aChannel, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) - Specified by:
onEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onEvent
public String onEvent(Class<ApplicationBusEvent> aEventType, String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) - Specified by:
onEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onEvent
public String onEvent(Class<ApplicationBusEvent> aEventType, Enum<?> aAction, Class<?> aPublisherType, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) - Specified by:
onEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onEvent
public String onEvent(Class<ApplicationBusEvent> aEventType, Enum<?> aAction, String aChannel, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) - Specified by:
onEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onEvent
public String onEvent(Class<ApplicationBusEvent> aEventType, Enum<?> aAction, String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) - Specified by:
onEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onEvent
public String onEvent(Class<ApplicationBusEvent> aEventType, Enum<?> aAction, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) - Specified by:
onEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
subscribe
public <EVT extends ApplicationBusEvent> String subscribe(Class<EVT> aEventType, ApplicationEventMatcher aEventMatcher, org.refcodes.observer.Observer<EVT> aObserver) - Specified by:
subscribe
in interfaceorg.refcodes.eventbus.EventBusObservable<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, String>
-
subscribe
public <EVT extends ApplicationBusEvent> String subscribe(Class<EVT> aEventType, org.refcodes.observer.Observer<EVT> aObserver) - Specified by:
subscribe
in interfaceorg.refcodes.eventbus.EventBusObservable<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, String>
-
onType
public <EVT extends ApplicationBusEvent> String onType(Class<EVT> aEventType, org.refcodes.observer.Observer<EVT> aObserver) - Specified by:
onType
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onAlias
public String onAlias(Class<ApplicationBusEvent> aEventType, String aName, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) - Specified by:
onAlias
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onChannel
public String onChannel(Class<ApplicationBusEvent> aEventType, String aChannel, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) - Specified by:
onChannel
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onGroup
public String onGroup(Class<ApplicationBusEvent> aEventType, String aGroup, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) - Specified by:
onGroup
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onUniversalId
public String onUniversalId(Class<ApplicationBusEvent> aEventType, String aUid, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) - Specified by:
onUniversalId
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onAction
public String onAction(Class<ApplicationBusEvent> aEventType, Enum<?> aAction, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver) - Specified by:
onAction
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
onActions
public String onActions(Class<ApplicationBusEvent> aEventType, org.refcodes.observer.Observer<ApplicationBusEvent> aObserver, Enum<?>... aActions) - Specified by:
onActions
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
publishEvent
- Specified by:
publishEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
publishEvent
- Specified by:
publishEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
publishEvent
public void publishEvent(String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType) - Specified by:
publishEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
publishEvent
- Specified by:
publishEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
publishEvent
- Specified by:
publishEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
publishEvent
public void publishEvent(Enum<?> aAction, String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType) - Specified by:
publishEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
publishEvent
public void publishEvent(org.refcodes.mixin.EventMetaData aEventMetaData) - Specified by:
publishEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
publishEvent
- Specified by:
publishEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
publishEvent
- Specified by:
publishEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
publishEvent
- Specified by:
publishEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
publishEvent
- Specified by:
publishEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
publishEvent
public void publishEvent(String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, org.refcodes.eventbus.DispatchStrategy aStrategy) - Specified by:
publishEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
publishEvent
public void publishEvent(Enum<?> aAction, Class<?> aPublisherType, org.refcodes.eventbus.DispatchStrategy aStrategy) - Specified by:
publishEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
publishEvent
public void publishEvent(Enum<?> aAction, String aChannel, org.refcodes.eventbus.DispatchStrategy aStrategy) - Specified by:
publishEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
publishEvent
public void publishEvent(Enum<?> aAction, String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, org.refcodes.eventbus.DispatchStrategy aStrategy) - Specified by:
publishEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
publishEvent
public void publishEvent(org.refcodes.mixin.EventMetaData aEventMetaData, org.refcodes.eventbus.DispatchStrategy aStrategy) - Specified by:
publishEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
publishEvent
public void publishEvent(Enum<?> aAction, org.refcodes.mixin.EventMetaData aEventMetaData, org.refcodes.eventbus.DispatchStrategy aStrategy) - Specified by:
publishEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
publishEvent
- Specified by:
publishEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-
publishEvent
public void publishEvent(org.refcodes.eventbus.DispatchStrategy aStrategy) - Specified by:
publishEvent
in interfaceorg.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,
org.refcodes.observer.Observer<ApplicationBusEvent>, ApplicationEventMatcher, org.refcodes.mixin.EventMetaData, String>
-