A
- The type of the action stored in the event.SRC
- The type of the source in question.public class MetaDataActionEventImpl<A,SRC> extends AbstractActionEvent<A,SRC> implements MetaDataActionEvent<A,SRC>
ActionEvent
storing a defined set of
EventMetaData
.
TIPP: In order to distinguish MetaDataActionEventImpl
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 an Observer
you may use the declarative
method EventMatcherByDeclaration.actionEqualWith(Object)
to test
whether your action was notified (or a simple switch case statement).
SourceAccessor.SourceMutator<SRC>, SourceAccessor.SourceProperty<SRC>
MetaDataAccessor.MetaDataMutator<MD>, MetaDataAccessor.MetaDataProperty<MD>
Constructor and Description |
---|
MetaDataActionEventImpl(A aAction,
SRC aSource)
Constructs an event with the given meta Data.
|
MetaDataActionEventImpl(EventMetaData aEventMetaData,
A aAction,
SRC aSource)
Constructs an event with the given meta Data.
|
MetaDataActionEventImpl(EventMetaData aEventMetaData,
SRC aSource)
Constructs an event with the given meta Data.
|
MetaDataActionEventImpl(SRC aSource)
Constructs an event with the given meta Data.
|
MetaDataActionEventImpl(String channel,
SRC aSource)
Constructs an event with the given meta Data.
|
Modifier and Type | Method and Description |
---|---|
EventMetaData |
getMetaData() |
getAction
getSource
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAction
getSource
public MetaDataActionEventImpl(EventMetaData aEventMetaData, SRC aSource)
aEventMetaData
- The meta data to by supplied by the event.aSource
- The source from which this event originated.public MetaDataActionEventImpl(String channel, SRC aSource)
channel
- The value for ChannelAccessor.getChannel()
attribute.aSource
- The source from which this event originated.public MetaDataActionEventImpl(EventMetaData aEventMetaData, A aAction, SRC aSource)
A
- The type of the action stored in the event. CAUTION: The
drawback of not using generic generic type declaration on a class
level is no granted type safety, the advantage is the ease of use:
Sub-classes can be used out of the box.aEventMetaData
- The meta data to by supplied by the event.aAction
- The action which the ActionEvent
represents.aSource
- The source from which this event originated.public MetaDataActionEventImpl(A aAction, SRC aSource)
A
- The type of the action stored in the event. CAUTION: The
drawback of not using generic generic type declaration on a class
level is no granted type safety, the advantage is the ease of use:
Sub-classes can be used out of the box.aEventMetaData
- The meta data to by supplied by the event.aAction
- The action which the ActionEvent
represents.aSource
- The source from which this event originated.public MetaDataActionEventImpl(SRC aSource)
aEventMetaData
- The meta data to by supplied by the event.aSource
- The source from which this event originated.public EventMetaData getMetaData()
getMetaData
in interface MetaDataAccessor<EventMetaData>
Copyright © 2016. All rights reserved.