java.lang.Object
org.refcodes.mixin.EventMetaDataImpl
- All Implemented Interfaces:
AliasAccessor
,ChannelAccessor
,EventMetaData
,GroupAccessor
,UniversalIdAccessor
Straight forward implementation of the minimal
EventMetaData
interface. You might work in your domain driven framework with according
sub-types of the EventMetaData
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
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs 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
Modifier and TypeMethodDescriptiongetAlias()
Retrieves the alias from the alias property.Retrieves the channel from the channel property.getGroup()
Retrieves the group from the group property.Class<?>
The least common denominator in event Meta-Data is the type of the publisher which gives a hint on the source of the event.Retrieves the UID from the UID property.protected void
initUid()
toString()
-
Field Details
-
_uid
-
_alias
-
_group
-
_channel
-
_publisherType
-
-
Constructor Details
-
EventMetaDataImpl
public EventMetaDataImpl()Constructs theEventMetaData
with no properties set except the Universal-TID. -
EventMetaDataImpl
Constructs theEventMetaData
with the given properties.- Parameters:
aPublisherType
- The type of the publisher.
-
EventMetaDataImpl
Constructs theEventMetaData
with the given properties.- Parameters:
aAlias
- The alias for theEventMetaData
.aGroup
- The group for theEventMetaData
.aChannel
- The channel for theEventMetaData
.
-
EventMetaDataImpl
Constructs theEventMetaData
with the given properties.- Parameters:
aAlias
- The alias for theEventMetaData
.aGroup
- The group for theEventMetaData
.
-
EventMetaDataImpl
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
Constructs theEventMetaData
with the given properties.- Parameters:
aChannel
- The channel for theEventMetaData
.aPublisherType
- The name for theEventMetaData
.
-
EventMetaDataImpl
Constructs theEventMetaData
with the properties provided by the givenEventMetaData
instance.- Parameters:
aMetaData
- TheEventMetaData
instance from which to get the properties.
-
-
Method Details
-
getUniversalId
Retrieves the UID from the UID property.- Specified by:
getUniversalId
in interfaceUniversalIdAccessor
- Returns:
- The UID stored by the UID property.
-
getAlias
Retrieves the alias from the alias property.- Specified by:
getAlias
in interfaceAliasAccessor
- Returns:
- The alias stored by the alias property.
-
getGroup
Retrieves the group from the group property.- Specified by:
getGroup
in interfaceGroupAccessor
- Returns:
- The group stored by the group property.
-
getChannel
Retrieves the channel from the channel property.- Specified by:
getChannel
in interfaceChannelAccessor
- Returns:
- The channel stored by the channel property.
-
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.
-
toString
-
initUid
protected void initUid()
-