Class Message<E>

  • Type Parameters:
    E - message type
    All Implemented Interfaces:
    java.io.Serializable

    public class Message<E>
    extends java.util.EventObject
    Message for ITopic.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected E messageObject  
      • Fields inherited from class java.util.EventObject

        source
    • Constructor Summary

      Constructors 
      Constructor Description
      Message​(java.lang.String topicName, E messageObject, long publishTime, Member publishingMember)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      E getMessageObject()
      Returns the published message
      Member getPublishingMember()
      Returns the member that published the message.
      long getPublishTime()
      Return the time when the message is published
      • Methods inherited from class java.util.EventObject

        getSource, toString
      • Methods inherited from class java.lang.Object

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

      • messageObject

        protected E messageObject
    • Constructor Detail

      • Message

        public Message​(java.lang.String topicName,
                       E messageObject,
                       long publishTime,
                       Member publishingMember)
    • Method Detail

      • getMessageObject

        public E getMessageObject()
        Returns the published message
        Returns:
        the published message object
      • getPublishTime

        public long getPublishTime()
        Return the time when the message is published
        Returns:
        the time when the message is published in milliseconds since 1970.01.01.
      • getPublishingMember

        public Member getPublishingMember()
        Returns the member that published the message. It can be that the member is null if:
        1. the message was send by a client and not a member
        2. the member that send the message, left the cluster before the message was processed.
        Returns:
        the member that published the message