Package org.azd.abstractions
Class ResponseHandler
java.lang.Object
org.azd.abstractions.ResponseHandler
- Direct Known Subclasses:
ApiResponseHandler,ErrorResponseHandler,RedirectResponseHandler,SerializerHandler
Handles the Api response.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ApiResponseGet the Api response object after the execution of a request.abstract CompletableFuture<Void>handleAsync(ResponseContext context) Handles the Api response.protected CompletableFuture<Void>nextAsync(ResponseContext context) Invokes the next handler in the pipelinesetNext(ResponseHandler next) Sets the next handler in pipeline.static voidsetResponse(ApiResponse response) Sets the Api response object.
-
Field Details
-
next
-
-
Constructor Details
-
ResponseHandler
public ResponseHandler()
-
-
Method Details
-
setNext
Sets the next handler in pipeline.- Parameters:
next- Next handler to invoke- Returns:
- ResponseHandler handler.
-
nextAsync
Invokes the next handler in the pipeline- Parameters:
context- Response context object container.- Returns:
- Result of invocation.
-
getResponse
Get the Api response object after the execution of a request.- Returns:
- ApiResponse object
ApiResponse.
-
handleAsync
Handles the Api response.- Parameters:
context- ResponseContext objectResponseContext- Returns:
- Java type value that is passed.
-
setResponse
Sets the Api response object.- Parameters:
response- ApiResponse object to setApiResponse
-