Package org.refcodes.observer
Class EventMetaDataImpl
- java.lang.Object
-
- org.refcodes.observer.EventMetaDataImpl
-
- All Implemented Interfaces:
org.refcodes.mixin.AliasAccessor
,org.refcodes.mixin.ChannelAccessor
,org.refcodes.mixin.GroupAccessor
,org.refcodes.mixin.UniversalIdAccessor
,EventMetaData
public class EventMetaDataImpl extends java.lang.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
org.refcodes.mixin.AliasAccessor.AliasBuilder<B extends org.refcodes.mixin.AliasAccessor.AliasBuilder<B>>, org.refcodes.mixin.AliasAccessor.AliasMutator, org.refcodes.mixin.AliasAccessor.AliasProperty
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.ChannelAccessor
org.refcodes.mixin.ChannelAccessor.ChannelBuilder<B extends org.refcodes.mixin.ChannelAccessor.ChannelBuilder<B>>, org.refcodes.mixin.ChannelAccessor.ChannelMutator, org.refcodes.mixin.ChannelAccessor.ChannelProperty
-
Nested classes/interfaces inherited from interface org.refcodes.observer.EventMetaData
EventMetaData.EventMetaDataBuilder
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.GroupAccessor
org.refcodes.mixin.GroupAccessor.GroupBuilder<B extends org.refcodes.mixin.GroupAccessor.GroupBuilder<B>>, org.refcodes.mixin.GroupAccessor.GroupMutator, org.refcodes.mixin.GroupAccessor.GroupProperty
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.UniversalIdAccessor
org.refcodes.mixin.UniversalIdAccessor.UniversalIdBuilder<B extends org.refcodes.mixin.UniversalIdAccessor.UniversalIdBuilder<B>>, org.refcodes.mixin.UniversalIdAccessor.UniversalIdMutator, org.refcodes.mixin.UniversalIdAccessor.UniversalIdProperty
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
_alias
protected java.lang.String
_channel
protected java.lang.String
_group
protected java.lang.Class<?>
_publisherType
protected java.lang.String
_uid
-
Constructor Summary
Constructors Constructor Description EventMetaDataImpl()
Constructs theEventMetaData
with no properties set except the Universal-ID.EventMetaDataImpl(java.lang.Class<?> aPublisherType)
Constructs theEventMetaData
with the given properties.EventMetaDataImpl(java.lang.String aChannel)
Constructs theEventMetaData
with the given properties.EventMetaDataImpl(java.lang.String aChannel, java.lang.Class<?> aPublisherType)
Constructs theEventMetaData
with the given properties.EventMetaDataImpl(java.lang.String aAlias, java.lang.String aGroup)
Constructs theEventMetaData
with the given properties.EventMetaDataImpl(java.lang.String aAlias, java.lang.String aGroup, java.lang.String aChannel)
Constructs theEventMetaData
with the given properties.EventMetaDataImpl(java.lang.String aAlias, java.lang.String aGroup, java.lang.String aChannel, java.lang.String aUid, java.lang.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 java.lang.String
getAlias()
java.lang.String
getChannel()
java.lang.String
getGroup()
java.lang.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.java.lang.String
getUniversalId()
java.lang.String
toString()
-
-
-
Constructor Detail
-
EventMetaDataImpl
public EventMetaDataImpl()
Constructs theEventMetaData
with no properties set except the Universal-ID. The Universal-ID is set by invoking theUniqueIdGeneratorSingleton
'sUniqueIdGeneratorImpl.next()
method.
-
EventMetaDataImpl
public EventMetaDataImpl(java.lang.Class<?> aPublisherType)
Constructs theEventMetaData
with the given properties. The Universal-ID is set by invoking theUniqueIdGeneratorSingleton
'sUniqueIdGeneratorImpl.next()
method.- Parameters:
aPublisherType
- The type of the publisher.
-
EventMetaDataImpl
public EventMetaDataImpl(java.lang.String aAlias, java.lang.String aGroup, java.lang.String aChannel)
Constructs theEventMetaData
with the given properties. The Universal-ID is set by invoking theUniqueIdGeneratorSingleton
'sUniqueIdGeneratorImpl.next()
method.- Parameters:
aAlias
- The alias for theEventMetaData
.aGroup
- The group for theEventMetaData
.aChannel
- The channel for theEventMetaData
.
-
EventMetaDataImpl
public EventMetaDataImpl(java.lang.String aAlias, java.lang.String aGroup)
Constructs theEventMetaData
with the given properties. The Universal-ID is set by invoking theUniqueIdGeneratorSingleton
'sUniqueIdGeneratorImpl.next()
method.- Parameters:
aAlias
- The alias for theEventMetaData
.aGroup
- The group for theEventMetaData
.
-
EventMetaDataImpl
public EventMetaDataImpl(java.lang.String aChannel)
Constructs theEventMetaData
with the given properties. The Universal-ID is set by invoking theUniqueIdGeneratorSingleton
'sUniqueIdGeneratorImpl.next()
method.- Parameters:
aChannel
- The channel for theEventMetaData
.
-
EventMetaDataImpl
public EventMetaDataImpl(java.lang.String aAlias, java.lang.String aGroup, java.lang.String aChannel, java.lang.String aUid, java.lang.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-ID for theEventMetaData
.aPublisherType
- The name for theEventMetaData
.
-
EventMetaDataImpl
public EventMetaDataImpl(java.lang.String aChannel, java.lang.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 java.lang.String getUniversalId()
- Specified by:
getUniversalId
in interfaceorg.refcodes.mixin.UniversalIdAccessor
-
getAlias
public java.lang.String getAlias()
- Specified by:
getAlias
in interfaceorg.refcodes.mixin.AliasAccessor
-
getGroup
public java.lang.String getGroup()
- Specified by:
getGroup
in interfaceorg.refcodes.mixin.GroupAccessor
-
getChannel
public java.lang.String getChannel()
- Specified by:
getChannel
in interfaceorg.refcodes.mixin.ChannelAccessor
-
getPublisherType
public java.lang.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.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-