Class ResponseHandler

java.lang.Object
org.azd.abstractions.ResponseHandler
Direct Known Subclasses:
ApiResponseHandler, ErrorResponseHandler, RedirectResponseHandler, SerializerHandler

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

  • Constructor Details

    • ResponseHandler

      public ResponseHandler()
  • Method Details

    • setNext

      public ResponseHandler setNext(ResponseHandler next)
      Sets the next handler in pipeline.
      Parameters:
      next - Next handler to invoke
      Returns:
      ResponseHandler handler.
    • nextAsync

      protected CompletableFuture<Void> nextAsync(ResponseContext context)
      Invokes the next handler in the pipeline
      Parameters:
      context - Response context object container.
      Returns:
      Result of invocation.
    • getResponse

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

      public abstract CompletableFuture<Void> handleAsync(ResponseContext context)
      Handles the Api response.
      Parameters:
      context - ResponseContext object ResponseContext
      Returns:
      Java type value that is passed.
    • setResponse

      public static void setResponse(ApiResponse response)
      Sets the Api response object.
      Parameters:
      response - ApiResponse object to set ApiResponse