Class ChenileResponseHandler

java.lang.Object
org.springframework.web.client.DefaultResponseErrorHandler
org.chenile.proxy.interceptors.ChenileResponseHandler
All Implemented Interfaces:
org.springframework.web.client.ResponseErrorHandler

public class ChenileResponseHandler extends org.springframework.web.client.DefaultResponseErrorHandler
This communicates with SpringRestTemplate to find the errors from the returned response.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ChenileResponseHandler(ChenileExchange exchange, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
     
    protected com.fasterxml.jackson.core.type.TypeReference<?>
     
    void
    handleError(org.springframework.http.client.ClientHttpResponse response)
     
    boolean
    hasError(org.springframework.http.client.ClientHttpResponse httpResponse)
     
    protected void
    parseBody(byte[] body, org.springframework.http.client.ClientHttpResponse response)
     

    Methods inherited from class org.springframework.web.client.DefaultResponseErrorHandler

    getCharset, getResponseBody, handleError, hasError, hasError, initBodyConvertFunction

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.web.client.ResponseErrorHandler

    handleError
  • Constructor Details

    • ChenileResponseHandler

      public ChenileResponseHandler(ChenileExchange exchange, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
  • Method Details

    • hasError

      public boolean hasError(org.springframework.http.client.ClientHttpResponse httpResponse) throws IOException
      Specified by:
      hasError in interface org.springframework.web.client.ResponseErrorHandler
      Overrides:
      hasError in class org.springframework.web.client.DefaultResponseErrorHandler
      Throws:
      IOException
    • handleError

      public void handleError(org.springframework.http.client.ClientHttpResponse response) throws IOException
      Specified by:
      handleError in interface org.springframework.web.client.ResponseErrorHandler
      Overrides:
      handleError in class org.springframework.web.client.DefaultResponseErrorHandler
      Throws:
      IOException
    • parseBody

      protected void parseBody(byte[] body, org.springframework.http.client.ClientHttpResponse response) throws IOException
      Throws:
      IOException
    • getTypeReference

      protected com.fasterxml.jackson.core.type.TypeReference<?> getTypeReference()
    • getEndpointName

      protected String getEndpointName()