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<E extends org.refcodes.observer.GenericEvent<?>,
O extends org.refcodes.observer.Observer<E>, MATCH extends org.refcodes.observer.EventMatcher<E>, META extends org.refcodes.mixin.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 plainGenericEventBus
https://www.metacodes.proization.Specialization of theGenericEventBusEvent
to be used with theEventBus
.Intuitive Meta-Class for theMetaDataActionEventBuilderImpl
as used by theEventBusImpl
.Intuitive Meta-Class for theMetaDataActionEventImpl
as used by theEventBusImpl
.A convenience definition of anEventMatcher
for the ready to use out of the boxEventBusImpl
implementation of the genericGenericEventBus
definition.TheEventBusImpl
defines a predefinedGenericEventBus
tailored to use theMetaDataActionEvent
as event type to use.EventBusObservable<E extends org.refcodes.observer.GenericEvent<?>,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 boxEventBusImpl
implementation of the genericGenericEventBus
definition.EventBusPublisher<E extends org.refcodes.observer.GenericEvent<?>>TheEventBusPublisher
defines methods to publish events as ofPublisher.publishEvent(GenericEvent)
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.GenericEventBus<E extends org.refcodes.observer.GenericEvent<?>,O extends org.refcodes.observer.Observer<E>, MATCH extends org.refcodes.observer.EventMatcher<E>, META extends org.refcodes.mixin.EventMetaData, H> TheGenericEventBus
is the (virtual) machine wide manager forGenericActionEvent
handling.GenericEventBusEvent<A,META extends org.refcodes.mixin.EventMetaData, SRC extends GenericEventBus<?, ?, ?, ?, ?>> Intuitive Meta-Interface for theGenericActionMetaDataEvent
as used by theEventBusImpl
.GenericEventBusEvent.GenericEventBusEventBuilder<A,META extends org.refcodes.mixin.EventMetaData, SRC extends GenericEventBus<?, ?, ?, ?, ?>, B extends GenericEventBusEvent.GenericEventBusEventBuilder<A, META, SRC, B>> Intuitive Meta-Interface for theGenericEventBusEvent.GenericEventBusEventBuilder
as used by theGenericEventBus
.