Class RestTemplateErrorHandler

java.lang.Object
es.kukenan.smartfi.microservice.firm.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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handleError(org.springframework.http.client.ClientHttpResponse response)
    Handle error of rest template invocations.
    boolean
    hasError(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, wait

    Methods 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:
      hasError in interface org.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:
      handleError in interface org.springframework.web.client.ResponseErrorHandler
      Parameters:
      response - response result of internal call.
      Throws:
      IOException - Errors occurs during the process.