Module org.refcodes.eventbus
Package org.refcodes.eventbus
package org.refcodes.eventbus
This artifacts implements a lightweight infrastructure for event based
decoupled communication. This is achieved by implementing the
Observer pattern
combined with the Publish–subscribe
pattern, ending up being a
Message broker for
events
.
Please refer to the refcodes-eventbus: Observer + Publish/Subscribe = Message broker documentation for an up-to-date and detailed description on the usage of this artifact.
-
ClassDescriptionAbstractEventBus<EVT extends EventBrokerEvent<?>,
O extends org.refcodes.observer.Observer<EVT>, MATCH extends EventBrokerEventMatcher<EVT>, META extends org.refcodes.observer.EventMetaData, H> The Class AbstractEventBus.TheDispatchStrategy
defines how child events are published within a parent event publish cycle.Provides an accessor for aDispatchStrategy
property.Provides a mutator for aDispatchStrategy
property.Provides aDispatchStrategy
property.Ready to implement vanilla plainEventBroker
.EventBrokerEvent<SRC>Specialization of theEventDispatcherEvent
to be used with theEventBroker
.EventBrokerEventMatcher<EVT extends EventBrokerEvent<?>>A convenience definition of anEventMatcher
for the ready to use out of the boxEventBus
implementation of the genericEventDispatcher
definition.TheEventBus
defines a predefinedEventDispatcher
tailored to use theMetaDataActionEvent
as event type to use.Intuitive Meta-Class for theMetaDataActionEvent
as used by theEventBus
.Builder to buildEventBusEvent
.A convenience definition of anEventMatcher
for the ready to use out of the boxEventBus
implementation of the genericEventDispatcher
definition.EventBusObservable<E extends org.refcodes.observer.Event<?>,O extends org.refcodes.observer.Observer<E>, MATCH extends org.refcodes.observer.EventMatcher<E>, H> A convenience definition of anObserver
for the ready to use out of the boxEventBus
implementation of the genericEventDispatcher
definition.EventBusPublisher<E extends org.refcodes.observer.Event<?>>TheEventBusPublisher
defines methods to publish events as ofPublisher.publishEvent(Event)
and to test beforehand if there is a consumer for a given event as ofMatchable.isMatching(Object)
.Declarative syntactic sugar which may be statically imported in order to allow declarative definitions for theEventBusEventMatcher
elements.EventDispatcher<E extends org.refcodes.observer.Event<?>,O extends org.refcodes.observer.Observer<E>, MATCH extends org.refcodes.observer.EventMatcher<E>, META extends org.refcodes.observer.EventMetaData, H> TheEventDispatcher
is the (virtual) machine wide manager forActionEvent
handling.EventDispatcherEvent<A,META extends org.refcodes.observer.EventMetaData, SRC> Intuitive Meta-Interface for theMetaDataActionEvent
as used by theEventBus
.EventDispatcherEvent.EventDispatcherEventBuilder<A,META extends org.refcodes.observer.EventMetaData, SRC extends EventDispatcher<?, ?, ?, ?, ?>, B extends EventDispatcherEvent.EventDispatcherEventBuilder<A, META, SRC, B>> Intuitive Meta-Interface for theEventDispatcherEvent.EventDispatcherEventBuilder
as used by theEventDispatcher
.