Class Response


  • public class Response
    extends Object
    Result of a message request processing. If Result is Success, `ErrorCondition` is absent or not used in the processing of the message. In the other cases, the `ErrorCondition` has to be present and can refine the processing of the message response. `AdditionalResponse` gives more information about the success or the failure of the message request processing, for logging without real time involvements.
    • Constructor Detail

      • Response

        public Response()
    • Method Detail

      • result

        public Response result​(Result result)
        result
        Parameters:
        result -
        Returns:
        the current Response instance, allowing for method chaining
      • getResult

        public Result getResult()
        Get result
        Returns:
        result
      • setResult

        public void setResult​(Result result)
        result
        Parameters:
        result -
      • errorCondition

        public Response errorCondition​(ErrorCondition errorCondition)
        errorCondition
        Parameters:
        errorCondition -
        Returns:
        the current Response instance, allowing for method chaining
      • getErrorCondition

        public ErrorCondition getErrorCondition()
        Get errorCondition
        Returns:
        errorCondition
      • setErrorCondition

        public void setErrorCondition​(ErrorCondition errorCondition)
        errorCondition
        Parameters:
        errorCondition -
      • additionalResponse

        public Response additionalResponse​(String additionalResponse)
        Additional information related to processing status of a message request. If present, the POI logs it for further examination.
        Parameters:
        additionalResponse - Additional information related to processing status of a message request. If present, the POI logs it for further examination.
        Returns:
        the current Response instance, allowing for method chaining
      • getAdditionalResponse

        public String getAdditionalResponse()
        Additional information related to processing status of a message request. If present, the POI logs it for further examination.
        Returns:
        additionalResponse Additional information related to processing status of a message request. If present, the POI logs it for further examination.
      • setAdditionalResponse

        public void setAdditionalResponse​(String additionalResponse)
        Additional information related to processing status of a message request. If present, the POI logs it for further examination.
        Parameters:
        additionalResponse - Additional information related to processing status of a message request. If present, the POI logs it for further examination.
      • includeNullValues

        public Response includeNullValues​(boolean includeNullValues)
        Configures whether null values are explicitly serialized in the JSON payload. Default is false.
      • isIncludeNullValues

        public boolean isIncludeNullValues()
        Returns whether null values are explicitly serialized in the JSON payload.
      • setIncludeNullValues

        public void setIncludeNullValues​(boolean includeNullValues)
        Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
      • equals

        public boolean equals​(Object o)
        Return true if this Response object is equal to o.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getExplicitNulls

        public Map<String,​Object> getExplicitNulls()
        Returns a map of properties to be merged into the JSON payload as explicit null values.
      • fromJson

        public static Response fromJson​(String jsonString)
                                 throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of Response given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of Response
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to Response
      • toJson

        public String toJson()
                      throws com.fasterxml.jackson.core.JsonProcessingException
        Convert an instance of Response to an JSON string
        Returns:
        JSON string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException