Interface ChannelMessage

All Superinterfaces:
Cloneable, Serializable
All Known Implementing Classes:
ChannelData

public interface ChannelMessage extends Serializable, Cloneable
Message that is passed through the interceptor stack after the data serialized in the Channel object and then passed down to the interceptor and eventually down to the ChannelSender component.
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    Shallow clone, what gets cloned depends on the implementation
    Deep clone, all fields MUST get cloned
    Get the address that this message originated from.
    returns the byte buffer that contains the actual message payload
    int
    The message options is a 32 bit flag set that triggers interceptors and message behavior.
    long
    Timestamp of when the message was created.
    byte[]
    Each message must have a globally unique Id. interceptors heavily depend on this id for message processing
    void
    Sets the source or reply-to address of this message
    void
    The byte buffer that contains the actual message payload
    void
    setOptions(int options)
    sets the option bits for this message
    void
    setTimestamp(long timestamp)
    Sets the timestamp of this message.
  • Method Details Link icon

    • getAddress Link icon

      Member getAddress()
      Get the address that this message originated from. Almost always Channel.getLocalMember(boolean). This would be set to a different address if the message was being relayed from a host other than the one that originally sent it.
      Returns:
      the source or reply-to address of this message
    • setAddress Link icon

      void setAddress(Member member)
      Sets the source or reply-to address of this message
      Parameters:
      member - Member
    • getTimestamp Link icon

      long getTimestamp()
      Timestamp of when the message was created.
      Returns:
      long timestamp in milliseconds
    • setTimestamp Link icon

      void setTimestamp(long timestamp)
      Sets the timestamp of this message.
      Parameters:
      timestamp - The timestamp
    • getUniqueId Link icon

      byte[] getUniqueId()
      Each message must have a globally unique Id. interceptors heavily depend on this id for message processing
      Returns:
      byte
    • setMessage Link icon

      void setMessage(XByteBuffer buf)
      The byte buffer that contains the actual message payload
      Parameters:
      buf - XByteBuffer
    • getMessage Link icon

      XByteBuffer getMessage()
      returns the byte buffer that contains the actual message payload
      Returns:
      XByteBuffer
    • getOptions Link icon

      int getOptions()
      The message options is a 32 bit flag set that triggers interceptors and message behavior.
      Returns:
      int - the option bits set for this message
      See Also:
    • setOptions Link icon

      void setOptions(int options)
      sets the option bits for this message
      Parameters:
      options - int
      See Also:
    • clone Link icon

      Object clone()
      Shallow clone, what gets cloned depends on the implementation
      Returns:
      ChannelMessage
    • deepclone Link icon

      Object deepclone()
      Deep clone, all fields MUST get cloned
      Returns:
      ChannelMessage