Class HandleResponseStage<OutputT>
- java.lang.Object
-
- software.amazon.awssdk.core.internal.http.pipeline.stages.HandleResponseStage<OutputT>
-
- All Implemented Interfaces:
RequestPipeline<SdkHttpFullResponse,Response<OutputT>>
public class HandleResponseStage<OutputT> extends Object implements RequestPipeline<SdkHttpFullResponse,Response<OutputT>>
Pipeline stage that executes anHttpResponseHandlerto transform the response into aResponseobject that contains a flag indicating success of failure and an unmarshalled response object or exception as appropriate.
-
-
Constructor Summary
Constructors Constructor Description HandleResponseStage(HttpResponseHandler<Response<OutputT>> responseHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Response<OutputT>execute(SdkHttpFullResponse httpResponse, RequestExecutionContext context)Execute the pipeline with the given input.
-
-
-
Constructor Detail
-
HandleResponseStage
public HandleResponseStage(HttpResponseHandler<Response<OutputT>> responseHandler)
-
-
Method Detail
-
execute
public Response<OutputT> execute(SdkHttpFullResponse httpResponse, RequestExecutionContext context) throws Exception
Description copied from interface:RequestPipelineExecute the pipeline with the given input.- Specified by:
executein interfaceRequestPipeline<SdkHttpFullResponse,Response<OutputT>>- Parameters:
httpResponse- Input to pipeline.context- Context containing both request dependencies, and a container for any mutable state that must be shared between stages.- Returns:
- Output of pipeline.
- Throws:
Exception- If any error occurs. This will be thrown out of the pipeline, if exceptions must be handled seeRequestPipelineBuilder.wrappedWith(BiFunction).
-
-