SRC - The type of the source in question.public class MetaDataEventImpl<SRC> extends AbstractEvent<SRC> implements MetaDataEvent<SRC>
ActionEvent storing a defined set of
EventMetaData.
TIPP: In order to distinguish MetaDataEventImpl 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 EventMatcherSugar.actionEqualWith(Object) to test
whether your action was notified (or a simple switch case statement).
| Constructor and Description |
|---|
MetaDataEventImpl(EventMetaData aEventMetaData,
SRC aSource)
Constructs an event with the given meta Data.
|
MetaDataEventImpl(SRC aSource)
Constructs an event with the given meta Data.
|
MetaDataEventImpl(String channel,
SRC aSource)
Constructs an event with the given meta Data.
|
| Modifier and Type | Method and Description |
|---|---|
EventMetaData |
getMetaData() |
getSourcepublic MetaDataEventImpl(EventMetaData aEventMetaData, SRC aSource)
aEventMetaData - The meta data to by supplied by the event.aSource - The source from which this event originated.public MetaDataEventImpl(String channel, SRC aSource)
channel - The value for ChannelAccessor.getChannel()
attribute.aSource - The source from which this event originated.public MetaDataEventImpl(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 EventMetaData getMetaData()
getMetaData in interface org.refcodes.mixin.MetaDataAccessor<EventMetaData>Copyright © 2017. All rights reserved.