All Superinterfaces:
org.refcodes.component.Destroyable, DestroyBus, org.refcodes.eventbus.DispatchStrategyAccessor, org.refcodes.eventbus.EventBusObservable<ApplicationBusEvent,org.refcodes.observer.Observer<ApplicationBusEvent>,ApplicationEventMatcher,String>, org.refcodes.eventbus.EventBusPublisher<ApplicationBusEvent>, ExceptionBus, org.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,org.refcodes.observer.Observer<ApplicationBusEvent>,ApplicationEventMatcher,org.refcodes.mixin.EventMetaData,String>, org.refcodes.component.HandleLookup<String,org.refcodes.observer.Observer<ApplicationBusEvent>>, InitializeBus, LifecycleBus, org.refcodes.matcher.Matchable<ApplicationBusEvent>, MessageBus, PauseBus, PayloadBus, PropertiesBus, org.refcodes.observer.Publisher<ApplicationBusEvent>, ResumeBus, StartBus, StopBus
All Known Subinterfaces:
MessagePropertiesBus
All Known Implementing Classes:
ApplicationBusImpl

public interface ApplicationBus extends 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.