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> TheAbstractActionEventprovides a base implementation for anActionEvent.AbstractEvent<SRC>TheAbstractEventprovides a base implementation for anEvent.AbstractEventMatcher<E extends Event<?>>Abstract implementation of anEventMatchertype.AbstractMetaDataActionEvent<A,EM extends EventMetaData, SRC> TheAbstractMetaDataActionEventprovides a base implementation for anMetaDataActionEvent.TheAbstractMetaDataEventprovides a base implementation for anMetaDataEvent.AbstractObservable<O,EV> This abstract class provides functionality to implement default refcodesObservablebehavior.Matches the given action with the action stored in an event's meta data (ACTION EQUAL WITH).ActionEvent<A,SRC> AnActionEventextends theEventand 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 theMatcherinterface for the usage withActionEventinstances.Declarative syntactic sugar which may be statically imported in order to allow declarative definitions for theEventMatcherelements.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> AnMetaDataActionEventprovides Meta-Data describing theActionEventin more detail and a source being the origin of theMetaDataActionEvent.AnMetaDataEventprovides Meta-Data describing theActionEventin more detail and a source being the origin of theMetaDataEvent.This interface typifies theMatcherinterface for the usage withMetaDataEventinstances.Observable<O>TheObservableinterface can be implemented by any class which can be observed byObserverinstances (proposal) or any listener interface (custom as of your needs).ObservableObserver<O extends Observable<?>>AnObservableObserveris an observer, observing an observable.The listener of an event subscriber to be fed with events by a event publisher.ThisObserverDescriptordescribes theObserver, i.e. in some cases anObserverrequires anEventMatcherwhich determines whichActionEventinstances to pass to theObserver.Provides methods to manage all subscribedObserverinstances as a whole and is intended as an extension of theObservableinterface.A system publishingActionEventinstances (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>AnSubscribeEventis published by anObservablewhen 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>AnUnsubscribeEventis published by anObservablewhen an observer is being unsubscribed.