Class ExternalRequestMessage

java.lang.Object
com.iohao.net.framework.protocol.ExternalRequestMessage
All Implemented Interfaces:
UserIdentity

public final class ExternalRequestMessage extends Object implements UserIdentity
Request message sent from an external (Netty) server to a logic server.

Carries user identity information, a trace id for distributed tracing, and the external server / template context. Extends ExternalCommonMessage with request-specific fields.

Since:
25.1
Author:
渔民小镇
date:
2025-09-10
  • Constructor Details

    • ExternalRequestMessage

      public ExternalRequestMessage()
  • Method Details

    • ofClone

      public ExternalRequestMessage ofClone()
      Create a shallow clone of this request message.
      Returns:
      a new ExternalRequestMessage with the same field values
    • setPayload

      void setPayload(byte[] payload)
      Set the raw binary payload.
      Parameters:
      payload - the payload bytes
    • setPayload

      default void setPayload(int payload)
      Set the payload from an int value.
      Parameters:
      payload - the int value to serialize
    • setPayload

      default void setPayload(long payload)
      Set the payload from a long value.
      Parameters:
      payload - the long value to serialize
    • setPayload

      default void setPayload(boolean payload)
      Set the payload from a boolean value.
      Parameters:
      payload - the boolean value to serialize
    • setPayload

      default void setPayload(String payload)
      Set the payload from a String value.
      Parameters:
      payload - the string value to serialize