Class ApiCallAttemptTimeoutTrackingStage<OutputT>
java.lang.Object
software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptTimeoutTrackingStage<OutputT>
- All Implemented Interfaces:
RequestPipeline<SdkHttpFullRequest,
,Response<OutputT>> RequestToResponsePipeline<OutputT>
public final class ApiCallAttemptTimeoutTrackingStage<OutputT>
extends Object
implements RequestToResponsePipeline<OutputT>
Wrapper around a
RequestPipeline
to manage the api call attempt timeout feature.-
Constructor Summary
ConstructorDescriptionApiCallAttemptTimeoutTrackingStage
(HttpClientDependencies dependencies, RequestPipeline<SdkHttpFullRequest, Response<OutputT>> wrapped) -
Method Summary
Modifier and TypeMethodDescriptionexecute
(SdkHttpFullRequest request, RequestExecutionContext context) Start and end api call attempt timer around the execution of the api call attempt.
-
Constructor Details
-
ApiCallAttemptTimeoutTrackingStage
public ApiCallAttemptTimeoutTrackingStage(HttpClientDependencies dependencies, RequestPipeline<SdkHttpFullRequest, Response<OutputT>> wrapped)
-
-
Method Details
-
execute
public Response<OutputT> execute(SdkHttpFullRequest request, RequestExecutionContext context) throws Exception Start and end api call attempt timer around the execution of the api call attempt. It's important that the client execution task is canceled before the InterruptedException is handled by the wrappedRequestPipeline.execute(InputT, software.amazon.awssdk.core.internal.http.RequestExecutionContext)
call so the interrupt status doesn't leak out to the callers code.- Specified by:
execute
in interfaceRequestPipeline<SdkHttpFullRequest,
Response<OutputT>> - Parameters:
request
- 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)
.
-