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 minimalEventMetaDatainterface. You might work in your domain driven framework with according sub-types of theEventMetaDatainterface 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_aliasprotected java.lang.String_channelprotected java.lang.String_groupprotected java.lang.Class<?>_publisherTypeprotected java.lang.String_uid
-
Constructor Summary
Constructors Constructor Description EventMetaDataImpl()Constructs theEventMetaDatawith no properties set except the Universal-ID.EventMetaDataImpl(java.lang.Class<?> aPublisherType)Constructs theEventMetaDatawith the given properties.EventMetaDataImpl(java.lang.String aChannel)Constructs theEventMetaDatawith the given properties.EventMetaDataImpl(java.lang.String aChannel, java.lang.Class<?> aPublisherType)Constructs theEventMetaDatawith the given properties.EventMetaDataImpl(java.lang.String aAlias, java.lang.String aGroup)Constructs theEventMetaDatawith the given properties.EventMetaDataImpl(java.lang.String aAlias, java.lang.String aGroup, java.lang.String aChannel)Constructs theEventMetaDatawith 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 theEventMetaDatawith the given properties.EventMetaDataImpl(EventMetaData aMetaData)Constructs theEventMetaDatawith the properties provided by the givenEventMetaDatainstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAlias()java.lang.StringgetChannel()java.lang.StringgetGroup()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.StringgetUniversalId()java.lang.StringtoString()
-
-
-
Constructor Detail
-
EventMetaDataImpl
public EventMetaDataImpl()
Constructs theEventMetaDatawith 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 theEventMetaDatawith 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 theEventMetaDatawith 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 theEventMetaDatawith 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 theEventMetaDatawith 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 theEventMetaDatawith 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 theEventMetaDatawith the given properties.- Parameters:
aChannel- The channel for theEventMetaData.aPublisherType- The name for theEventMetaData.
-
EventMetaDataImpl
public EventMetaDataImpl(EventMetaData aMetaData)
Constructs theEventMetaDatawith the properties provided by the givenEventMetaDatainstance.- Parameters:
aMetaData- TheEventMetaDatainstance from which to get the properties.
-
-
Method Detail
-
getUniversalId
public java.lang.String getUniversalId()
- Specified by:
getUniversalIdin interfaceorg.refcodes.mixin.UniversalIdAccessor
-
getAlias
public java.lang.String getAlias()
- Specified by:
getAliasin interfaceorg.refcodes.mixin.AliasAccessor
-
getGroup
public java.lang.String getGroup()
- Specified by:
getGroupin interfaceorg.refcodes.mixin.GroupAccessor
-
getChannel
public java.lang.String getChannel()
- Specified by:
getChannelin 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:
getPublisherTypein interfaceEventMetaData- Returns:
- The type of the publisher who published the event.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-