Module org.refcodes.observer
Package org.refcodes.observer
package org.refcodes.observer
This package provides types supporting the Observable-Pattern. E.g. we have
the definitions of an
Observable
and the
according Observer
.
An Observable
for example can be observed by
Observer
instances being subscribed to it via
Observable.subscribeObserver(Object)
.-
ClassDescriptionAbstractActionEvent<A,
SRC> TheAbstractActionEvent
provides a base implementation for anActionEvent
.AbstractEvent<SRC>TheAbstractEvent
provides a base implementation for anEvent
.AbstractEventMatcher<E extends Event<?>>Abstract implementation of anEventMatcher
type.AbstractMetaDataActionEvent<A,EM extends EventMetaData, SRC> TheAbstractMetaDataActionEvent
provides a base implementation for anMetaDataActionEvent
.TheAbstractMetaDataEvent
provides a base implementation for anMetaDataEvent
.AbstractObservable<O,EV> This abstract class provides functionality to implement default refcodesObservable
behavior.Matches the given action with the action stored in an event's meta data (ACTION EQUAL WITH).ActionEvent<A,SRC> AnActionEvent
extends theEvent
and provides additional means to provide an action viaActionAccessor.getAction()
being of a generic type.Matches the given alias with the alias stored in an event's meta data (ALIAS EQUAL WITH).Catches all events, no matching is done (CATCH ALL).Catches no events, no matching is done (CATCH NONE).Matches the given channel with the channel stored in an event's meta data (CHANNEL EQUAL WITH).Event<SRC>EventMatcher<E extends Event<?>>This interface typifies theMatcher
interface for the usage withActionEvent
instances.Declarative syntactic sugar which may be statically imported in order to allow declarative definitions for theEventMatcher
elements.The Meta-Data describes the event which a publisher posts via the event bus to an event subscriber's event listener.Builder to buildEventMetaData
.Matches the given group with the group stored in an event's meta data (GROUP EQUAL WITH).MetaDataActionEvent<A,EM extends EventMetaData, SRC> AnMetaDataActionEvent
provides Meta-Data describing theActionEvent
in more detail and a source being the origin of theMetaDataActionEvent
.AnMetaDataEvent
provides Meta-Data describing theActionEvent
in more detail and a source being the origin of theMetaDataEvent
.This interface typifies theMatcher
interface for the usage withMetaDataEvent
instances.Observable<O>TheObservable
interface can be implemented by any class which can be observed byObserver
instances (proposal) or any listener interface (custom as of your needs).ObservableObserver<O extends Observable<?>>AnObservableObserver
is an observer, observing an observable.The listener of an event subscriber to be fed with events by a event publisher.ThisObserverDescriptor
describes theObserver
, i.e. in some cases anObserver
requires anEventMatcher
which determines whichActionEvent
instances to pass to theObserver
.Provides methods to manage all subscribedObserver
instances as a whole and is intended as an extension of theObservable
interface.A system publishingActionEvent
instances (such as an event bus), may implement this interface.Provides an accessor for a publisher's type property.Provides a builder method for a publisher's type property returning the builder for applying multiple build operations.Provides a mutator for a publisher's type property.Provides a publisher's type property.Matches by event publisher type (EVENT PUBLISHER TYPE).SubscribeEvent<SRC>AnSubscribeEvent
is published by anObservable
when an observer is being subscribed.Matches the given universal ID with the universal ID stored in an event's meta data (UNIVERSAL ID EQUAL WITH).UnsubscribeEvent<SRC>AnUnsubscribeEvent
is published by anObservable
when an observer is being unsubscribed.