RpcMessage (Apache Tomcat 9.0.119 API Documentation)
Description: declaration: package: org.apache.catalina.tribes.group, class: RpcMessage

# Class RpcMessage

java.lang.Object
org.apache.catalina.tribes.group.RpcMessage

All Implemented Interfaces:
  `Externalizable, Serializable`

Direct Known Subclasses:
  `RpcMessage.NoRpcChannelReply`

public class RpcMessage extends Object implements 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 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, Serializable message)`
  Create a new RpcMessage.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `readExternal(ObjectInput in)`
  `String`
  `toString()`
  `void`
  `writeExternal(ObjectOutput out)`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### message

    protected 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 Details

  - ### RpcMessage

    public RpcMessage()
    Default constructor required by Externalizable.

  - ### RpcMessage

    public RpcMessage(byte[] rpcId, byte[] uuid, Serializable message)
    Create a new RpcMessage.
    Parameters:
      `rpcId` - The RPC channel identifier
      `uuid` - The unique identifier for this message
      `message` - The message payload

- ## Method Details

  - ### readExternal

    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
    Specified by:
      `readExternal` in interface `Externalizable`
    Throws:
      `IOException`
      `ClassNotFoundException`

  - ### writeExternal

    public void writeExternal(ObjectOutput out) throws IOException
    Specified by:
      `writeExternal` in interface `Externalizable`
    Throws:
      `IOException`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`