Package org.refcodes.observer
Class AbstractActionMetaDataEvent<A,EM extends org.refcodes.mixin.EventMetaData,SRC>
- java.lang.Object
-
- org.refcodes.observer.AbstractEvent<SRC>
-
- org.refcodes.observer.AbstractActionEvent<A,SRC>
-
- org.refcodes.observer.AbstractActionMetaDataEvent<A,EM,SRC>
-
- Type Parameters:
A
- The type of the action stored in the event.EM
- The type of the EventMetaDataSRC
- The type of the source in question.
- All Implemented Interfaces:
org.refcodes.mixin.ActionAccessor<A>
,org.refcodes.mixin.MetaDataAccessor<A>
,org.refcodes.mixin.SourceAccessor<A>
,GenericActionEvent<A,EM>
,GenericActionMetaDataEvent<A,EM,SRC>
,GenericEvent<A>
,GenericMetaDataEvent<A,EM>
- Direct Known Subclasses:
AbstractActionMetaDataEvent.AbstractActionMetaDataEventBuilder
,AbstractActionPayloadMetaDataEvent
,ActionMetaDataEventImpl
public abstract class AbstractActionMetaDataEvent<A,EM extends org.refcodes.mixin.EventMetaData,SRC> extends AbstractActionEvent<A,SRC> implements GenericActionMetaDataEvent<A,EM,SRC>
Ready to useGenericActionEvent
storing a defined set ofEventMetaData
.TIPP: In order to distinguish
AbstractActionMetaDataEvent
instances from each other, create an actions enumeration, enumerating the various event actions you support. Pass the actual action you intend to notify upon to the according constructor, as anObserver
you may use the declarative methodEventMatcherSugar.actionEqualWith(Object)
to test whether your action was notified (or a simple switch case statement).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractActionMetaDataEvent.AbstractActionMetaDataEventBuilder<A,EM extends org.refcodes.mixin.EventMetaData,SRC,B extends GenericActionMetaDataEvent.GenericActionMetaDataEventBuilder<A,EM,SRC,B>>
Implementation of theGenericActionMetaDataEvent.GenericActionMetaDataEventBuilder
interface for easily creatingActionMetaDataEvent
instances.-
Nested classes/interfaces inherited from interface org.refcodes.mixin.ActionAccessor
org.refcodes.mixin.ActionAccessor.ActionBuilder<A extends Object,B extends org.refcodes.mixin.ActionAccessor.ActionBuilder<A,B>>, org.refcodes.mixin.ActionAccessor.ActionMutator<A extends Object>, org.refcodes.mixin.ActionAccessor.ActionProperty<A extends Object>
-
Nested classes/interfaces inherited from interface org.refcodes.observer.GenericActionMetaDataEvent
GenericActionMetaDataEvent.GenericActionMetaDataEventBuilder<A,EM extends org.refcodes.mixin.EventMetaData,SRC,B extends GenericActionMetaDataEvent.GenericActionMetaDataEventBuilder<A,EM,SRC,B>>
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.MetaDataAccessor
org.refcodes.mixin.MetaDataAccessor.MetaDataBuilder<MD extends Object,B extends org.refcodes.mixin.MetaDataAccessor.MetaDataBuilder<MD,B>>, org.refcodes.mixin.MetaDataAccessor.MetaDataMutator<MD extends Object>, org.refcodes.mixin.MetaDataAccessor.MetaDataProperty<MD extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description protected EM
_eventMetaData
-
Fields inherited from class org.refcodes.observer.AbstractActionEvent
_action
-
-
Constructor Summary
Constructors Constructor Description AbstractActionMetaDataEvent(A aAction, EM aEventMetaData, SRC aSource)
Constructs an event with the given Meta-Data.AbstractActionMetaDataEvent(A aAction, SRC aSource)
Constructs an event with the given Meta-Data.AbstractActionMetaDataEvent(EM aEventMetaData, SRC aSource)
Constructs an event with the given Meta-Data.AbstractActionMetaDataEvent(SRC aSource)
Constructs an event with the given Meta-Data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EM
getMetaData()
String
toString()
-
Methods inherited from class org.refcodes.observer.AbstractActionEvent
getAction
-
Methods inherited from class org.refcodes.observer.AbstractEvent
getSource
-
-
-
-
Field Detail
-
_eventMetaData
protected EM extends org.refcodes.mixin.EventMetaData _eventMetaData
-
-
Constructor Detail
-
AbstractActionMetaDataEvent
public AbstractActionMetaDataEvent(EM aEventMetaData, SRC aSource)
Constructs an event with the given Meta-Data.- Parameters:
aEventMetaData
- The Meta-Data to by supplied by the event.aSource
- The source from which this event originated.
-
AbstractActionMetaDataEvent
public AbstractActionMetaDataEvent(A aAction, EM aEventMetaData, SRC aSource)
Constructs an event with the given Meta-Data.- Parameters:
aAction
- The action which the event represents.aEventMetaData
- The Meta-Data to by supplied by the event.aSource
- The source from which this event originated.
-
AbstractActionMetaDataEvent
public AbstractActionMetaDataEvent(A aAction, SRC aSource)
Constructs an event with the given Meta-Data.- Parameters:
aAction
- The action which the event represents.aSource
- The source from which this event originated.
-
AbstractActionMetaDataEvent
public AbstractActionMetaDataEvent(SRC aSource)
Constructs an event with the given Meta-Data.- Parameters:
aSource
- The source from which this event originated.
-
-