Class ResponseHandler

java.lang.Object
org.azd.abstractions.ResponseHandler
Direct Known Subclasses:
DefaultResponseHandler

public abstract class ResponseHandler extends Object
Handler the Api response.
  • Field Details

  • Constructor Details

    • ResponseHandler

      protected ResponseHandler(RetryHandler retryHandler)
  • Method Details

    • create

      public static ResponseHandler create(RetryHandler retryHandler)
      Creates an instance of Response handler.
      Parameters:
      retryHandler - Retry handler to retry the request.
      Returns:
      Response handler object.
    • getResponse

      public static ApiResponse getResponse()
      Get the Api response object after the execution of a request.
      Returns:
      ApiResponse object ApiResponse.
    • handle

      public abstract <T> T handle(HttpResponse<T> response, RequestInformation requestInformation)
      Handles the Api response.
      Type Parameters:
      T - Type parameter.
      Parameters:
      response - Http response object.
      requestInformation - Request information object. RequestInformation.
      Returns:
      Java type value that is passed.