public final class AsyncRetryableStage<OutputT> extends Object implements RequestPipeline<SdkHttpFullRequest,CompletableFuture<Response<OutputT>>>
Constructor and Description |
---|
AsyncRetryableStage(TransformingAsyncResponseHandler<Response<OutputT>> responseHandler,
HttpClientDependencies dependencies,
RequestPipeline<SdkHttpFullRequest,CompletableFuture<Response<OutputT>>> requestPipeline) |
AsyncRetryableStage(TransformingAsyncResponseHandler<Response<OutputT>> responseHandler,
HttpClientDependencies dependencies,
RequestPipeline<SdkHttpFullRequest,CompletableFuture<Response<OutputT>>> requestPipeline,
RateLimitingTokenBucket rateLimitingTokenBucket) |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Response<OutputT>> |
execute(SdkHttpFullRequest request,
RequestExecutionContext context)
Execute the pipeline with the given input.
|
public AsyncRetryableStage(TransformingAsyncResponseHandler<Response<OutputT>> responseHandler, HttpClientDependencies dependencies, RequestPipeline<SdkHttpFullRequest,CompletableFuture<Response<OutputT>>> requestPipeline)
public AsyncRetryableStage(TransformingAsyncResponseHandler<Response<OutputT>> responseHandler, HttpClientDependencies dependencies, RequestPipeline<SdkHttpFullRequest,CompletableFuture<Response<OutputT>>> requestPipeline, RateLimitingTokenBucket rateLimitingTokenBucket)
public CompletableFuture<Response<OutputT>> execute(SdkHttpFullRequest request, RequestExecutionContext context) throws Exception
RequestPipeline
execute
in interface RequestPipeline<SdkHttpFullRequest,CompletableFuture<Response<OutputT>>>
request
- Input to pipeline.context
- Context containing both request dependencies, and a container for any mutable state that must be shared
between stages.Exception
- If any error occurs. This will be thrown out of the pipeline, if exceptions must be handled see
RequestPipelineBuilder.wrappedWith(BiFunction)
.Copyright © 2021. All rights reserved.