Class ChenileResponseHandler
java.lang.Object
org.springframework.web.client.DefaultResponseErrorHandler
org.chenile.proxy.interceptors.ChenileResponseHandler
- All Implemented Interfaces:
ResponseErrorHandler
This communicates with SpringRestTemplate to find the errors from the returned response.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RemoteChenileExchangeprivate final tools.jackson.databind.ObjectMapper -
Constructor Summary
ConstructorsConstructorDescriptionChenileResponseHandler(RemoteChenileExchange exchange, tools.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected tools.jackson.core.type.TypeReference<?> voidhandleError(URI url, HttpMethod method, ClientHttpResponse response) booleanhasError(ClientHttpResponse httpResponse) protected voidparseBody(byte[] body, ClientHttpResponse response) Methods inherited from class DefaultResponseErrorHandler
getCharset, getResponseBody, handleError, hasError, initBodyConvertFunction
-
Field Details
-
chenileExchange
-
objectMapper
private final tools.jackson.databind.ObjectMapper objectMapper
-
-
Constructor Details
-
ChenileResponseHandler
public ChenileResponseHandler(RemoteChenileExchange exchange, tools.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
hasError
- Specified by:
hasErrorin interfaceResponseErrorHandler- Overrides:
hasErrorin classDefaultResponseErrorHandler- Throws:
IOException
-
handleError
- Specified by:
handleErrorin interfaceResponseErrorHandler- Overrides:
handleErrorin classDefaultResponseErrorHandler- Throws:
IOException
-
parseBody
- Throws:
IOException
-
getTypeReference
protected tools.jackson.core.type.TypeReference<?> getTypeReference() -
getEndpointName
-