Class ResponseCollectMessage
java.lang.Object
com.iohao.net.framework.protocol.ResponseCollectMessage
- All Implemented Interfaces:
ResponseCollect
Default implementation of
ResponseCollect that stores aggregated
responses from multiple logic servers.
Holds the list of individual Response objects along with a
top-level error code and message representing the overall collect outcome.
- Author:
- 渔民小镇
- date:
- 2022-05-22
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintOverall error code; 0 indicates success.Human-readable error message;nullon success.Individual responses collected from logic servers.voidsetErrorCode(int errorCode) Overall error code; 0 indicates success.voidsetErrorMessage(String errorMessage) Human-readable error message;nullon success.voidsetResponseList(List<Response> responseList) Individual responses collected from logic servers.toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ResponseCollect
isSuccess, setError
-
Constructor Details
-
ResponseCollectMessage
public ResponseCollectMessage()
-
-
Method Details
-
getResponseList
Individual responses collected from logic servers.- Specified by:
getResponseListin interfaceResponseCollect- Returns:
- the response list
-
getErrorCode
public int getErrorCode()Overall error code; 0 indicates success.- Specified by:
getErrorCodein interfaceResponseCollect- Returns:
- the error code
-
getErrorMessage
Human-readable error message;nullon success.- Specified by:
getErrorMessagein interfaceResponseCollect- Returns:
- the error message, or
nullon success
-
setResponseList
-
setErrorCode
public void setErrorCode(int errorCode) Overall error code; 0 indicates success.- Specified by:
setErrorCodein interfaceResponseCollect- Parameters:
errorCode- the error code
-
setErrorMessage
Human-readable error message;nullon success.- Specified by:
setErrorMessagein interfaceResponseCollect- Parameters:
errorMessage- the error message
-
toString
-