Class ResponseCollectMessage

java.lang.Object
com.iohao.net.framework.protocol.ResponseCollectMessage
All Implemented Interfaces:
ResponseCollect

public class ResponseCollectMessage extends Object implements 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 Details

    • ResponseCollectMessage

      public ResponseCollectMessage()
  • Method Details

    • getResponseList

      public List<Response> getResponseList()
      Individual responses collected from logic servers.
      Specified by:
      getResponseList in interface ResponseCollect
      Returns:
      the response list
    • getErrorCode

      public int getErrorCode()
      Overall error code; 0 indicates success.
      Specified by:
      getErrorCode in interface ResponseCollect
      Returns:
      the error code
    • getErrorMessage

      public String getErrorMessage()
      Human-readable error message; null on success.
      Specified by:
      getErrorMessage in interface ResponseCollect
      Returns:
      the error message, or null on success
    • setResponseList

      public void setResponseList(List<Response> responseList)
      Individual responses collected from logic servers.
    • setErrorCode

      public void setErrorCode(int errorCode)
      Overall error code; 0 indicates success.
      Specified by:
      setErrorCode in interface ResponseCollect
      Parameters:
      errorCode - the error code
    • setErrorMessage

      public void setErrorMessage(String errorMessage)
      Human-readable error message; null on success.
      Specified by:
      setErrorMessage in interface ResponseCollect
      Parameters:
      errorMessage - the error message
    • toString

      public String toString()
      Overrides:
      toString in class Object