Class ExternalRequestMessage
java.lang.Object
com.iohao.net.framework.protocol.ExternalRequestMessage
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionofClone()Create a shallow clone of this request message.default voidsetPayload(boolean payload) Set the payload from abooleanvalue.voidsetPayload(byte[] payload) Set the raw binary payload.default voidsetPayload(int payload) Set the payload from anintvalue.default voidsetPayload(long payload) Set the payload from alongvalue.default voidsetPayload(String payload) Set the payload from aStringvalue.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface UserIdentity
bindingUserId, getUserId, isVerifyIdentity, setUserId, setUserIdentity, setVerifyIdentity, verifyIdentity
-
Constructor Details
-
ExternalRequestMessage
public ExternalRequestMessage()
-
-
Method Details
-
ofClone
Create a shallow clone of this request message.- Returns:
- a new
ExternalRequestMessagewith 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 anintvalue.- Parameters:
payload- the int value to serialize
-
setPayload
default void setPayload(long payload) Set the payload from alongvalue.- Parameters:
payload- the long value to serialize
-
setPayload
default void setPayload(boolean payload) Set the payload from abooleanvalue.- Parameters:
payload- the boolean value to serialize
-
setPayload
-