Class RestTemplateErrorHandler
java.lang.Object
es.kukenan.smartfi.microservice.contracts.handler.RestTemplateErrorHandler
- All Implemented Interfaces:
org.springframework.web.client.ResponseErrorHandler
public class RestTemplateErrorHandler
extends Object
implements org.springframework.web.client.ResponseErrorHandler
Rest template error handler for internal calls.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleError(org.springframework.http.client.ClientHttpResponse response) Handle error of rest template invocations.booleanhasError(org.springframework.http.client.ClientHttpResponse response) Check type of rest template errors to handle.Methods 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
-
RestTemplateErrorHandler
public RestTemplateErrorHandler()
-
-
Method Details
-
hasError
public boolean hasError(org.springframework.http.client.ClientHttpResponse response) throws IOException Check type of rest template errors to handle.- Specified by:
hasErrorin interfaceorg.springframework.web.client.ResponseErrorHandler- Parameters:
response- Response of rest template internal invocation.- Returns:
- boolean check status of error to handle.
- Throws:
IOException- Error occurs during process.
-
handleError
public void handleError(org.springframework.http.client.ClientHttpResponse response) throws IOException Handle error of rest template invocations.- Specified by:
handleErrorin interfaceorg.springframework.web.client.ResponseErrorHandler- Parameters:
response- response result of internal call.- Throws:
IOException- Errors occurs during the process.
-