Class AbstractEvent

    • Constructor Detail

      • AbstractEvent

        public AbstractEvent​(EventTypeInterface type,
                             Serializable sourceId,
                             Serializable content)
        Construct a new Event, where compliance with the metadata is verified.
        Parameters:
        type - EventTypeInterface; the name of the Event.
        sourceId - Serializable; the source id of the sender
        content - Serializable; the content of the event
      • AbstractEvent

        public AbstractEvent​(EventTypeInterface type,
                             Serializable sourceId,
                             Serializable content,
                             boolean verifyMetaData)
        Construct a new Event, with a choice to verify compliance with metadata.
        Parameters:
        type - EventTypeInterface; the name of the Event.
        sourceId - Serializable; the source id of the sender
        content - Serializable; the content of the event
        verifyMetaData - boolean; whether to verify the compliance with metadata or not
    • Method Detail

      • getSourceId

        public final Serializable getSourceId()
        Return the id of the source of the event. The source is, or identifies the sender of the event
        Specified by:
        getSourceId in interface EventInterface
        Returns:
        Serializable; the id of the source of the event
      • getContent

        public final Serializable getContent()
        Return the content (payload) of this event.
        Specified by:
        getContent in interface EventInterface
        Returns:
        Serializable; the content (payload) of this event
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object