Package org.chenile.proxy.interceptors
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
ConstructorsConstructorDescriptionChenileResponseHandler(ChenileExchange exchange, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected com.fasterxml.jackson.core.type.TypeReference<?> voidhandleError(org.springframework.http.client.ClientHttpResponse response) booleanhasError(org.springframework.http.client.ClientHttpResponse httpResponse) protected voidparseBody(byte[] body, org.springframework.http.client.ClientHttpResponse response) Methods inherited from class org.springframework.web.client.DefaultResponseErrorHandler
getCharset, getResponseBody, handleError, hasError, hasError, initBodyConvertFunctionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
hasErrorin interfaceorg.springframework.web.client.ResponseErrorHandler- Overrides:
hasErrorin classorg.springframework.web.client.DefaultResponseErrorHandler- Throws:
IOException
-
handleError
public void handleError(org.springframework.http.client.ClientHttpResponse response) throws IOException - Specified by:
handleErrorin interfaceorg.springframework.web.client.ResponseErrorHandler- Overrides:
handleErrorin classorg.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
-