Class 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 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

        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.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  
    • 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​()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • _uid

        protected java.lang.String _uid
      • _alias

        protected java.lang.String _alias
      • _group

        protected java.lang.String _group
      • _channel

        protected java.lang.String _channel
      • _publisherType

        protected java.lang.Class<?> _publisherType
    • Constructor Detail

      • EventMetaDataImpl

        public EventMetaDataImpl​()
        Constructs the EventMetaData with no properties set except the Universal-ID. The Universal-ID is set by invoking the UniqueIdGeneratorSingleton's UniqueIdGeneratorImpl.next() method.
      • EventMetaDataImpl

        public EventMetaDataImpl​(java.lang.Class<?> aPublisherType)
        Constructs the EventMetaData with the given properties. The Universal-ID is set by invoking the UniqueIdGeneratorSingleton's UniqueIdGeneratorImpl.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 the EventMetaData with the given properties. The Universal-ID is set by invoking the UniqueIdGeneratorSingleton's UniqueIdGeneratorImpl.next() method.
        Parameters:
        aAlias - The alias for the EventMetaData.
        aGroup - The group for the EventMetaData.
        aChannel - The channel for the EventMetaData.
      • EventMetaDataImpl

        public EventMetaDataImpl​(java.lang.String aAlias,
                                 java.lang.String aGroup)
        Constructs the EventMetaData with the given properties. The Universal-ID is set by invoking the UniqueIdGeneratorSingleton's UniqueIdGeneratorImpl.next() method.
        Parameters:
        aAlias - The alias for the EventMetaData.
        aGroup - The group for the EventMetaData.
      • EventMetaDataImpl

        public EventMetaDataImpl​(java.lang.String aChannel)
        Constructs the EventMetaData with the given properties. The Universal-ID is set by invoking the UniqueIdGeneratorSingleton's UniqueIdGeneratorImpl.next() method.
        Parameters:
        aChannel - The channel for the EventMetaData.
      • EventMetaDataImpl

        public EventMetaDataImpl​(java.lang.String aAlias,
                                 java.lang.String aGroup,
                                 java.lang.String aChannel,
                                 java.lang.String aUid,
                                 java.lang.Class<?> aPublisherType)
        Constructs the EventMetaData with the given properties.
        Parameters:
        aAlias - The alias for the EventMetaData.
        aGroup - The group for the EventMetaData.
        aChannel - The channel for the EventMetaData.
        aUid - The Universal-ID for the EventMetaData.
        aPublisherType - The name for the EventMetaData.
      • EventMetaDataImpl

        public EventMetaDataImpl​(java.lang.String aChannel,
                                 java.lang.Class<?> aPublisherType)
        Constructs the EventMetaData with the given properties.
        Parameters:
        aChannel - The channel for the EventMetaData.
        aPublisherType - The name for the EventMetaData.
    • Method Detail

      • getUniversalId

        public java.lang.String getUniversalId​()
        Specified by:
        getUniversalId in interface org.refcodes.mixin.UniversalIdAccessor
      • getAlias

        public java.lang.String getAlias​()
        Specified by:
        getAlias in interface org.refcodes.mixin.AliasAccessor
      • getGroup

        public java.lang.String getGroup​()
        Specified by:
        getGroup in interface org.refcodes.mixin.GroupAccessor
      • getChannel

        public java.lang.String getChannel​()
        Specified by:
        getChannel in interface org.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 interface EventMetaData
        Returns:
        The type of the publisher who published the event.
      • toString

        public java.lang.String toString​()
        Overrides:
        toString in class java.lang.Object