- java.lang.Object
-
- org.refcodes.mixin.EventMetaDataImpl
-
- All Implemented Interfaces:
AliasAccessor
,ChannelAccessor
,EventMetaData
,GroupAccessor
,UniversalIdAccessor
public class EventMetaDataImpl extends Object implements EventMetaData
Straight forward implementation of the minimalEventMetaData
interface. You might work in your domain driven framework with according sub-types of theEventMetaData
interface and the according implementations of those.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.AliasAccessor
AliasAccessor.AliasBuilder<B extends AliasAccessor.AliasBuilder<B>>, AliasAccessor.AliasMutator, AliasAccessor.AliasProperty
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.ChannelAccessor
ChannelAccessor.ChannelBuilder<B extends ChannelAccessor.ChannelBuilder<B>>, ChannelAccessor.ChannelMutator, ChannelAccessor.ChannelProperty
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.EventMetaData
EventMetaData.EventMetaDataBuilder
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.GroupAccessor
GroupAccessor.GroupBuilder<B extends GroupAccessor.GroupBuilder<B>>, GroupAccessor.GroupMutator, GroupAccessor.GroupProperty
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.UniversalIdAccessor
UniversalIdAccessor.UniversalIdBuilder<B extends UniversalIdAccessor.UniversalIdBuilder<B>>, UniversalIdAccessor.UniversalIdMutator, UniversalIdAccessor.UniversalIdProperty
-
-
Constructor Summary
Constructors Constructor Description EventMetaDataImpl()
Constructs theEventMetaData
with no properties set except the Universal-TID.EventMetaDataImpl(Class<?> aPublisherType)
Constructs theEventMetaData
with the given properties.EventMetaDataImpl(String aChannel)
Constructs theEventMetaData
with the given properties.EventMetaDataImpl(String aChannel, Class<?> aPublisherType)
Constructs theEventMetaData
with the given properties.EventMetaDataImpl(String aAlias, String aGroup)
Constructs theEventMetaData
with the given properties.EventMetaDataImpl(String aAlias, String aGroup, String aChannel)
Constructs theEventMetaData
with the given properties.EventMetaDataImpl(String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType)
Constructs theEventMetaData
with the given properties.EventMetaDataImpl(EventMetaData aMetaData)
Constructs theEventMetaData
with the properties provided by the givenEventMetaData
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAlias()
Retrieves the alias from the alias property.String
getChannel()
Retrieves the channel from the channel property.String
getGroup()
Retrieves the group from the group property.Class<?>
getPublisherType()
The least common denominator in event Meta-Data is the type of the publisher which gives a hint on the source of the event.String
getUniversalId()
Retrieves the UID from the UID property.protected void
initUid()
String
toString()
-
-
-
Constructor Detail
-
EventMetaDataImpl
public EventMetaDataImpl()
Constructs theEventMetaData
with no properties set except the Universal-TID.
-
EventMetaDataImpl
public EventMetaDataImpl(Class<?> aPublisherType)
Constructs theEventMetaData
with the given properties.- Parameters:
aPublisherType
- The type of the publisher.
-
EventMetaDataImpl
public EventMetaDataImpl(String aAlias, String aGroup, String aChannel)
Constructs theEventMetaData
with the given properties.- Parameters:
aAlias
- The alias for theEventMetaData
.aGroup
- The group for theEventMetaData
.aChannel
- The channel for theEventMetaData
.
-
EventMetaDataImpl
public EventMetaDataImpl(String aAlias, String aGroup)
Constructs theEventMetaData
with the given properties.- Parameters:
aAlias
- The alias for theEventMetaData
.aGroup
- The group for theEventMetaData
.
-
EventMetaDataImpl
public EventMetaDataImpl(String aChannel)
Constructs theEventMetaData
with the given properties.- Parameters:
aChannel
- The channel for theEventMetaData
.
-
EventMetaDataImpl
public EventMetaDataImpl(String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType)
Constructs theEventMetaData
with the given properties.- Parameters:
aAlias
- The alias for theEventMetaData
.aGroup
- The group for theEventMetaData
.aChannel
- The channel for theEventMetaData
.aUid
- The Universal-TID for theEventMetaData
.aPublisherType
- The name for theEventMetaData
.
-
EventMetaDataImpl
public EventMetaDataImpl(String aChannel, Class<?> aPublisherType)
Constructs theEventMetaData
with the given properties.- Parameters:
aChannel
- The channel for theEventMetaData
.aPublisherType
- The name for theEventMetaData
.
-
EventMetaDataImpl
public EventMetaDataImpl(EventMetaData aMetaData)
Constructs theEventMetaData
with the properties provided by the givenEventMetaData
instance.- Parameters:
aMetaData
- TheEventMetaData
instance from which to get the properties.
-
-
Method Detail
-
getUniversalId
public String getUniversalId()
Retrieves the UID from the UID property.- Specified by:
getUniversalId
in interfaceUniversalIdAccessor
- Returns:
- The UID stored by the UID property.
-
getAlias
public String getAlias()
Retrieves the alias from the alias property.- Specified by:
getAlias
in interfaceAliasAccessor
- Returns:
- The alias stored by the alias property.
-
getGroup
public String getGroup()
Retrieves the group from the group property.- Specified by:
getGroup
in interfaceGroupAccessor
- Returns:
- The group stored by the group property.
-
getChannel
public String getChannel()
Retrieves the channel from the channel property.- Specified by:
getChannel
in interfaceChannelAccessor
- Returns:
- The channel stored by the channel property.
-
getPublisherType
public Class<?> getPublisherType()
The least common denominator in event Meta-Data is the type of the publisher which gives a hint on the source of the event.- Specified by:
getPublisherType
in interfaceEventMetaData
- Returns:
- The type of the publisher who published the event.
-
initUid
protected void initUid()
-
-