Class EventMetaDataImpl

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 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.
  • Field Details

    • _uid

      protected String _uid
    • _alias

      protected String _alias
    • _group

      protected String _group
    • _channel

      protected String _channel
    • _publisherType

      protected Class<?> _publisherType
  • Constructor Details

  • Method Details

    • getUniversalId

      public String getUniversalId()
      Retrieves the UID from the UID property.
      Specified by:
      getUniversalId in interface UniversalIdAccessor
      Returns:
      The UID stored by the UID property.
    • getAlias

      public String getAlias()
      Retrieves the alias from the alias property.
      Specified by:
      getAlias in interface AliasAccessor
      Returns:
      The alias stored by the alias property.
    • getGroup

      public String getGroup()
      Retrieves the group from the group property.
      Specified by:
      getGroup in interface GroupAccessor
      Returns:
      The group stored by the group property.
    • getChannel

      public String getChannel()
      Retrieves the channel from the channel property.
      Specified by:
      getChannel in interface ChannelAccessor
      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 interface EventMetaData
      Returns:
      The type of the publisher who published the event.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • initUid

      protected void initUid()