Class RequestMessage

java.lang.Object
com.iohao.net.framework.protocol.CommonMessage
com.iohao.net.framework.protocol.RequestMessage
All Implemented Interfaces:
FutureMessage, RemoteMessage, Request, UserIdentity
Direct Known Subclasses:
SendMessage

public class RequestMessage extends CommonMessage implements Request
Internal request message used for logic-to-logic server communication via Aeron.

Extends CommonMessage with Request fields including user identity, hop tracking, logic-server binding, and per-request attachment. Provides factory methods for creation and shallow cloning to support request forwarding across logic server boundaries.

Author:
渔民小镇
date:
2025-09-02
  • Constructor Details

    • RequestMessage

      public RequestMessage()
  • Method Details

    • of

      public static RequestMessage of(CmdInfo cmdInfo, byte[] data)
      Create a new RequestMessage with the given command route and payload.
      Parameters:
      cmdInfo - the command route descriptor
      data - the serialized request payload
      Returns:
      a new request message
    • ofClone

      public RequestMessage ofClone()
      Create a shallow clone of this request message, copying all routing and identity fields.

      Useful when forwarding a request to another logic server while preserving the original context.

      Returns:
      a new RequestMessage with the same field values