Class ResponseMessage
java.lang.Object
com.iohao.net.framework.protocol.CommonMessage
com.iohao.net.framework.protocol.ResponseMessage
- All Implemented Interfaces:
CommonResponse, FutureMessage, RemoteMessage, Response, UserIdentity
Internal response message used for logic-to-logic server communication via Aeron.
Extends CommonMessage and implements Response to provide typed data
extraction from the serialized payload. Carries user identity and error information
alongside the decoded response data.
- Since:
- 25.1
- Author:
- 渔民小镇
- date:
- 2025-09-03
-
Field Summary
Fields inherited from class CommonMessage
cmdMerge, data, externalServerId, futureId, logicServerId, nanoTime, netId, outputError, sourceServerId, traceId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGet the error code. 0 indicates success; any other value indicates an error.Get the human-readable error message.longGet the user id.<T> TDecode the response payload into the specified type.booleanCheck whether the user's identity has been verified (authenticated).<T> List<T> Decode the response payload into a list of the specified element type.voidsetErrorCode(int errorCode) Set the error code. 0 indicates success; any other value indicates an error.voidsetErrorMessage(String errorMessage) Set the human-readable error message.voidsetUserId(long userId) Set the user id.voidsetVerifyIdentity(boolean verifyIdentity) Set the identity verification flag.toString()Methods inherited from class CommonMessage
getCmdInfo, getCmdMerge, getData, getExternalServerId, getFutureId, getLogicServerId, getNanoTime, getNetId, getOutputError, getSourceServerId, getTraceId, setCmdInfo, setCmdMerge, setData, setExternalServerId, setFutureId, setLogicServerId, setNanoTime, setNetId, setOutputError, setSourceServerId, setTraceIdMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface CommonResponse
hasError, isSuccess, setErrorMethods inherited from interface FutureMessage
getFutureId, setFutureIdMethods inherited from interface RemoteMessage
getCmdInfo, getCmdMerge, getData, getExternalServerId, getLogicServerId, getNanoTime, getNetId, getSourceServerId, getTraceId, setCmdInfo, setCmdMerge, setData, setExternalServerId, setLogicServerId, setNanoTime, setNetId, setOutputError, setSourceServerId, setTraceIdMethods inherited from interface Response
getBoolean, getData, getInt, getLong, getString, listBoolean, listInt, listLong, listStringMethods inherited from interface UserIdentity
bindingUserId, setUserIdentity, verifyIdentity
-
Constructor Details
-
ResponseMessage
public ResponseMessage()
-
-
Method Details
-
getValue
-
listValue
-
getUserId
public long getUserId()Description copied from interface:UserIdentityGet the user id.- Specified by:
getUserIdin interfaceUserIdentity- Returns:
- the user id
-
isVerifyIdentity
public boolean isVerifyIdentity()Description copied from interface:UserIdentityCheck whether the user's identity has been verified (authenticated).- Specified by:
isVerifyIdentityin interfaceUserIdentity- Returns:
trueif the identity is verified
-
getErrorCode
public int getErrorCode()Description copied from interface:CommonResponseGet the error code. 0 indicates success; any other value indicates an error.- Specified by:
getErrorCodein interfaceCommonResponse- Returns:
- the error code
-
getErrorMessage
Description copied from interface:CommonResponseGet the human-readable error message.- Specified by:
getErrorMessagein interfaceCommonResponse- Returns:
- the error message, or
nullon success
-
setUserId
public void setUserId(long userId) Description copied from interface:UserIdentitySet the user id.- Specified by:
setUserIdin interfaceUserIdentity- Parameters:
userId- the user id
-
setVerifyIdentity
public void setVerifyIdentity(boolean verifyIdentity) Description copied from interface:UserIdentitySet the identity verification flag.- Specified by:
setVerifyIdentityin interfaceUserIdentity- Parameters:
verifyIdentity-trueif the identity is verified
-
setErrorCode
public void setErrorCode(int errorCode) Description copied from interface:CommonResponseSet the error code. 0 indicates success; any other value indicates an error.- Specified by:
setErrorCodein interfaceCommonResponse- Parameters:
errorCode- the error code
-
setErrorMessage
Description copied from interface:CommonResponseSet the human-readable error message.- Specified by:
setErrorMessagein interfaceCommonResponse- Parameters:
errorMessage- the error message
-
toString
- Overrides:
toStringin classCommonMessage
-