org.refcodes.eventbus.BusObservable<ApplicationEvent,org.refcodes.observer.Observer<ApplicationEvent>,ApplicationMatcher,org.refcodes.mixin.EventMetaData>
, org.refcodes.eventbus.BusPublisher<ApplicationEvent>
, DestroyBus
, org.refcodes.eventbus.DispatchStrategyAccessor
, org.refcodes.eventbus.EventBus<ApplicationEvent,org.refcodes.observer.Observer<ApplicationEvent>,ApplicationMatcher,org.refcodes.mixin.EventMetaData,String>
, org.refcodes.observer.EventMatcher<ApplicationEvent>
, org.refcodes.component.HandleLookup<ApplicationEvent,org.refcodes.observer.Observer<ApplicationEvent>>
, InitializeBus
, org.refcodes.matcher.Matcher<ApplicationEvent>
, PauseBus
, org.refcodes.observer.Publisher<ApplicationEvent>
, ResumeBus
, StartBus
, StopBus
ApplicationBus
, MessagePropertiesBus
ApplicationBusImpl
public interface LifeCycleBus extends InitializeBus, StartBus, PauseBus, ResumeBus, StopBus, DestroyBus
LifeCycleBus
extends the ApplicationBus
with convenience
functionality common to everyday application and service development
regarding dispatching of LifeCycleStatus
signals such as
InitializeBusEvent
, StartBusEvent
, PauseBusEvent
,
ResumeBusEvent
, StopBusEvent
or DestroyBusEvent
instances. To ensure controlled LifeCycleBusObserver
bootstrapping
(subscribed via 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.Modifier and Type | Method | Description |
---|---|---|
default String |
onLifeCycle(Class<?> aPublisherType,
LifeCycleBusObserver aObserver) |
Subscribes a
LifeCycleBusObserver for LifeCycleBusEvent
instances with the given attributes to be passed to the according
LifeCycleBusObserver methods. |
default String |
onLifeCycle(Enum<?> aAction,
Class<?> aPublisherType,
LifeCycleBusObserver aObserver) |
Subscribes a
LifeCycleBusObserver for LifeCycleBusEvent
instances with the given attributes to be passed to the according
LifeCycleBusObserver methods. |
default String |
onLifeCycle(Enum<?> aAction,
String aAlias,
String aGroup,
String aChannel,
String aUid,
Class<?> aPublisherType,
LifeCycleBusObserver aObserver) |
Subscribes a
LifeCycleBusObserver for LifeCycleBusEvent
instances with the given attributes to be passed to the according
LifeCycleBusObserver methods. |
default String |
onLifeCycle(Enum<?> aAction,
String aChannel,
LifeCycleBusObserver aObserver) |
Subscribes a
LifeCycleBusObserver for LifeCycleBusEvent
instances with the given attributes to be passed to the according
LifeCycleBusObserver methods. |
default String |
onLifeCycle(Enum<?> aAction,
LifeCycleBusObserver aObserver) |
Subscribes a
LifeCycleBusObserver for LifeCycleBusEvent
instances with the given attributes to be passed to the according
LifeCycleBusObserver methods. |
default String |
onLifeCycle(String aAlias,
String aGroup,
String aChannel,
String aUid,
Class<?> aPublisherType,
LifeCycleBusObserver aObserver) |
Subscribes a
LifeCycleBusObserver for LifeCycleBusEvent
instances with the given attributes to be passed to the according
LifeCycleBusObserver methods. |
default String |
onLifeCycle(String aChannel,
LifeCycleBusObserver aObserver) |
Subscribes a
LifeCycleBusObserver for LifeCycleBusEvent
instances with the given attributes to be passed to the according
LifeCycleBusObserver methods. |
default String |
onLifeCycle(LifeCycleBusObserver aObserver) |
Subscribes a
LifeCycleBusObserver for LifeCycleBusEvent
instances to be passed to the according LifeCycleBusObserver
methods. |
subscribe, subscribe, subscribe, unsubscribeAll
onDestroy, onDestroy, onDestroy, onDestroy, onDestroy, onDestroy, onDestroy, onDestroy, publishDestroy, publishDestroy, publishDestroy, publishDestroy, publishDestroy, publishDestroy, publishDestroy, publishDestroy, publishDestroy, publishDestroy
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, publishEvent, publishEvent
hasHandle, lookupHandle, removeHandle
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
onPause, onPause, onPause, onPause, onPause, onPause, onPause, onPause, publishPause, publishPause, publishPause, publishPause, publishPause, publishPause, publishPause, publishPause, publishPause, publishPause
onResume, onResume, onResume, onResume, onResume, onResume, onResume, onResume, publishResume, publishResume, publishResume, publishResume, publishResume, publishResume, publishResume, publishResume, publishResume, publishResume
onStart, onStart, onStart, onStart, onStart, onStart, onStart, onStart, publishStart, publishStart, publishStart, publishStart, publishStart, publishStart, publishStart, publishStart, publishStart, publishStart
onStop, onStop, onStop, onStop, onStop, onStop, onStop, onStop, publishStop, publishStop, publishStop, publishStop, publishStop, publishStop, publishStop, publishStop, publishStop, publishStop
default String onLifeCycle(LifeCycleBusObserver aObserver)
LifeCycleBusObserver
for LifeCycleBusEvent
instances to be passed to the according LifeCycleBusObserver
methods.aObserver
- The observer to be notified.default String onLifeCycle(Class<?> aPublisherType, LifeCycleBusObserver aObserver)
LifeCycleBusObserver
for LifeCycleBusEvent
instances with the given attributes to be passed to the according
LifeCycleBusObserver
methods.aPublisherType
- The type of the event publisher.aObserver
- The observer to be notified.default String onLifeCycle(String aChannel, LifeCycleBusObserver aObserver)
LifeCycleBusObserver
for LifeCycleBusEvent
instances with the given attributes to be passed to the according
LifeCycleBusObserver
methods.aChannel
- The channel name on which the event is receivable.aObserver
- The observer to be notified.default String onLifeCycle(String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, LifeCycleBusObserver aObserver)
LifeCycleBusObserver
for LifeCycleBusEvent
instances with the given attributes to be passed to the according
LifeCycleBusObserver
methods.aAlias
- The alias property.aGroup
- The group property.aChannel
- The channel property.aUid
- The UID (Universal-TID) property.aPublisherType
- The type of the event publisher.aObserver
- The observer to be notified.default String onLifeCycle(Enum<?> aAction, Class<?> aPublisherType, LifeCycleBusObserver aObserver)
LifeCycleBusObserver
for LifeCycleBusEvent
instances with the given attributes to be passed to the according
LifeCycleBusObserver
methods.aAction
- The action which this represents.aPublisherType
- The type of the event publisher.aObserver
- The observer to be notified.default String onLifeCycle(Enum<?> aAction, String aChannel, LifeCycleBusObserver aObserver)
LifeCycleBusObserver
for LifeCycleBusEvent
instances with the given attributes to be passed to the according
LifeCycleBusObserver
methods.aAction
- The action which this represents.aChannel
- The channel name on which the event is receivable.aObserver
- The observer to be notified.default String onLifeCycle(Enum<?> aAction, String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, LifeCycleBusObserver aObserver)
LifeCycleBusObserver
for LifeCycleBusEvent
instances with the given attributes to be passed to the according
LifeCycleBusObserver
methods.aAction
- The action which this represents.aAlias
- The alias property.aGroup
- The group property.aChannel
- The channel property.aUid
- The UID (Universal-TID) property.aPublisherType
- The type of the event publisher.aObserver
- The observer to be notified.default String onLifeCycle(Enum<?> aAction, LifeCycleBusObserver aObserver)
LifeCycleBusObserver
for LifeCycleBusEvent
instances with the given attributes to be passed to the according
LifeCycleBusObserver
methods.aAction
- The action which this represents.aObserver
- The observer to be notified.Copyright © 2021. All rights reserved.