Class RpcMessage

  • All Implemented Interfaces:
    java.io.Externalizable, java.io.Serializable
    Direct Known Subclasses:
    RpcMessage.NoRpcChannelReply

    public class RpcMessage
    extends java.lang.Object
    implements java.io.Externalizable
    A message used for RPC communication between group members.
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  RpcMessage.NoRpcChannelReply
      A reply message sent when no RPC channel is found for a given RPC ID.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.io.Serializable message
      The payload of the message.
      protected boolean reply
      Whether this message is a reply.
      protected byte[] rpcId
      The RPC channel identifier.
      protected byte[] uuid
      The unique identifier for this message.
    • Constructor Summary

      Constructors 
      Constructor Description
      RpcMessage()
      Default constructor required by Externalizable.
      RpcMessage​(byte[] rpcId, byte[] uuid, java.io.Serializable message)
      Create a new RpcMessage.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void readExternal​(java.io.ObjectInput in)  
      java.lang.String toString()  
      void writeExternal​(java.io.ObjectOutput out)  
      • Methods inherited from class java.lang.Object

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

      • message

        protected java.io.Serializable message
        The payload of the message.
      • uuid

        protected byte[] uuid
        The unique identifier for this message.
      • rpcId

        protected byte[] rpcId
        The RPC channel identifier.
      • reply

        protected boolean reply
        Whether this message is a reply.
    • Constructor Detail

      • RpcMessage

        public RpcMessage()
        Default constructor required by Externalizable.
      • RpcMessage

        public RpcMessage​(byte[] rpcId,
                          byte[] uuid,
                          java.io.Serializable message)
        Create a new RpcMessage.
        Parameters:
        rpcId - The RPC channel identifier
        uuid - The unique identifier for this message
        message - The message payload
    • Method Detail

      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Specified by:
        readExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Specified by:
        writeExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object