Class AbstractEvent

    • Constructor Detail

      • AbstractEvent

        public AbstractEvent​(String topic,
                             String payload,
                             @Nullable String source)
        Must be called in subclass constructor to create a new event.
        Parameters:
        topic - the topic
        payload - the payload
        source - the source
    • Method Detail

      • getTopic

        public String getTopic()
        Description copied from interface: Event
        Gets the topic of an event.
        Specified by:
        getTopic in interface Event
        Returns:
        the event topic
      • getPayload

        public String getPayload()
        Description copied from interface: Event
        Gets the payload as a serialized string.
        Specified by:
        getPayload in interface Event
        Returns:
        the serialized event
      • getSource

        public @Nullable String getSource()
        Description copied from interface: Event
        Gets the name of the source identifying the sender.
        Specified by:
        getSource in interface Event
        Returns:
        the name of the source