Class RequestPipelineBuilder<InputT,OutputT>
- java.lang.Object
-
- software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder<InputT,OutputT>
-
- Type Parameters:
InputT- Currently configured input type to theRequestPipeline.OutputT- Currently configured output type to theRequestPipeline.
@Immutable public final class RequestPipelineBuilder<InputT,OutputT> extends Object
Builder for aRequestPipeline.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <InputT,OutputT>
Function<HttpClientDependencies,RequestPipeline<CompletableFuture<InputT>,CompletableFuture<OutputT>>>async(Function<HttpClientDependencies,RequestPipeline<InputT,OutputT>> pipelineFactory)Convert a synchronousRequestPipelinefactory into a factory that produces a version of the RequestPipeline that accepts a CompletableFuture and returns a CompletableFuture.static <InputT,OutputT>
Function<HttpClientDependencies,RequestPipeline<CompletableFuture<InputT>,CompletableFuture<OutputT>>>async(Supplier<RequestPipeline<InputT,OutputT>> pipelineFactory)A version ofasync(Function)that takes aSupplierRequestPipeline<InputT,OutputT>build(HttpClientDependencies dependencies)Construct theRequestPipelinewith the currently configured stages.static <InputT,OutputT>
RequestPipelineBuilder<InputT,OutputT>first(Function<HttpClientDependencies,RequestPipeline<InputT,OutputT>> pipelineFactory)Factory method to create aRequestPipelineBuilderwith an initial pipeline stage.static <InputT,OutputT>
RequestPipelineBuilder<InputT,OutputT>first(Supplier<RequestPipeline<InputT,OutputT>> pipelineFactory)Factory method to create aRequestPipelineBuilderwith an initial pipeline stage.<NewOutputT>
RequestPipelineBuilder<InputT,NewOutputT>then(Function<HttpClientDependencies,RequestPipeline<OutputT,NewOutputT>> pipelineFactory)Factory method to chain the currentRequestPipelineBuilderwith another pipeline stage.<NewOutputT>
RequestPipelineBuilder<InputT,NewOutputT>then(Supplier<RequestPipeline<OutputT,NewOutputT>> pipelineFactory)Factory method to chain the currentRequestPipelineBuilderwith another pipeline stage.<NewInputT,NewOutputT>
RequestPipelineBuilder<NewInputT,NewOutputT>wrappedWith(BiFunction<HttpClientDependencies,RequestPipeline<InputT,OutputT>,RequestPipeline<NewInputT,NewOutputT>> wrappedFactory)Factory method to wrap the currentRequestPipelineBuilderwith another pipeline stage.<NewInputT,NewOutputT>
RequestPipelineBuilder<NewInputT,NewOutputT>wrappedWith(Function<RequestPipeline<InputT,OutputT>,RequestPipeline<NewInputT,NewOutputT>> wrappedFactory)Factory method to wrap the currentRequestPipelineBuilderwith another pipeline stage.
-
-
-
Method Detail
-
first
public static <InputT,OutputT> RequestPipelineBuilder<InputT,OutputT> first(Function<HttpClientDependencies,RequestPipeline<InputT,OutputT>> pipelineFactory)
Factory method to create aRequestPipelineBuilderwith an initial pipeline stage. Stages in this pipeline will only be able to accept anHttpClientDependenciesorHttpClientDependencies.- Type Parameters:
InputT- Input type of pipelineOutputT- Output type of pipeline.- Parameters:
pipelineFactory- Factory that can produce aRequestPipeline. Should take anHttpClientDependenciesobject as the first parameter to the factory method.- Returns:
- RequestPipelineBuilder composed of that initial stage.
- See Also:
build(HttpClientDependencies)
-
first
public static <InputT,OutputT> RequestPipelineBuilder<InputT,OutputT> first(Supplier<RequestPipeline<InputT,OutputT>> pipelineFactory)
Factory method to create aRequestPipelineBuilderwith an initial pipeline stage. Stages in this pipeline will only be able to accept anHttpClientDependenciesorHttpClientDependencies.- Type Parameters:
InputT- Input type of pipelineOutputT- Output type of pipeline.- Parameters:
pipelineFactory- Factory that can produce aRequestPipeline. Use this overload when the factory does not needHttpClientDependenciesand should instead take no arguments.- Returns:
- RequestPipelineBuilder composed of that initial stage.
- See Also:
build(HttpClientDependencies)
-
then
public <NewOutputT> RequestPipelineBuilder<InputT,NewOutputT> then(Function<HttpClientDependencies,RequestPipeline<OutputT,NewOutputT>> pipelineFactory)
Factory method to chain the currentRequestPipelineBuilderwith another pipeline stage. The new stage's input type must match the current stage's output type. The new stage may define a new output type (if it's transforming the type) or may define the same output type as the current stage.- Type Parameters:
NewOutputT- New output type of pipeline- Parameters:
pipelineFactory- Factory that can produce aRequestPipeline. Should take anHttpClientDependenciesobject as the first parameter to the factory method.- Returns:
- A new RequestPipelineBuilder composed of the previous stages and the new stage.
- See Also:
build(HttpClientDependencies)
-
async
public static <InputT,OutputT> Function<HttpClientDependencies,RequestPipeline<CompletableFuture<InputT>,CompletableFuture<OutputT>>> async(Function<HttpClientDependencies,RequestPipeline<InputT,OutputT>> pipelineFactory)
Convert a synchronousRequestPipelinefactory into a factory that produces a version of the RequestPipeline that accepts a CompletableFuture and returns a CompletableFuture.- Type Parameters:
InputT- the input type of the originalRequestPipelineOutputT- the return type of the originalRequestPipeline- Parameters:
pipelineFactory- the delegate pipeline factory to wrap- Returns:
- the wrapped
RequestPipelinefactory
-
async
public static <InputT,OutputT> Function<HttpClientDependencies,RequestPipeline<CompletableFuture<InputT>,CompletableFuture<OutputT>>> async(Supplier<RequestPipeline<InputT,OutputT>> pipelineFactory)
A version ofasync(Function)that takes aSupplier- See Also:
async(Supplier)
-
then
public <NewOutputT> RequestPipelineBuilder<InputT,NewOutputT> then(Supplier<RequestPipeline<OutputT,NewOutputT>> pipelineFactory)
Factory method to chain the currentRequestPipelineBuilderwith another pipeline stage. The new stage's input type must match the current stage's output type. The new stage may define a new output type (if it's transforming the type) or may define the same output type as the current stage.- Type Parameters:
NewOutputT- New output type of pipeline- Parameters:
pipelineFactory- Factory that can produce aRequestPipeline. Use this overload when the factory does not needHttpClientDependenciesand should instead take no arguments.- Returns:
- A new RequestPipelineBuilder composed of the previous stages and the new stage.
- See Also:
build(HttpClientDependencies)
-
wrappedWith
public <NewInputT,NewOutputT> RequestPipelineBuilder<NewInputT,NewOutputT> wrappedWith(BiFunction<HttpClientDependencies,RequestPipeline<InputT,OutputT>,RequestPipeline<NewInputT,NewOutputT>> wrappedFactory)
Factory method to wrap the currentRequestPipelineBuilderwith another pipeline stage. The argument to wrap is a factory that takes anHttpClientDependenciesobject and a innerRequestPipeline(the current one being built) as arguments and produces a newRequestPipelinefor the wrapper. The wrapper may have entirely different input and output types, typically it will have the same however.- Type Parameters:
NewOutputT- New output type of pipeline- Parameters:
wrappedFactory-BiFunctionfactory that can produce aRequestPipeline. The arguments to the factory will beHttpClientDependenciesand an innerRequestPipeline.- Returns:
- A new RequestPipelineBuilder that wraps around the pipeline currently being constructed.
- See Also:
build(HttpClientDependencies)
-
wrappedWith
public <NewInputT,NewOutputT> RequestPipelineBuilder<NewInputT,NewOutputT> wrappedWith(Function<RequestPipeline<InputT,OutputT>,RequestPipeline<NewInputT,NewOutputT>> wrappedFactory)
Factory method to wrap the currentRequestPipelineBuilderwith another pipeline stage. The argument is a factory that takes an innerRequestPipeline(the current one being built) as an argument and produces a newRequestPipelinefor the wrapper. The wrapper may have entirely different input and output types, typically it will have the same however.- Type Parameters:
NewOutputT- New output type of pipeline- Parameters:
wrappedFactory-Functionfactory that can produce aRequestPipeline. The argument to the factory will be an innerRequestPipeline.- Returns:
- A new RequestPipelineBuilder that wraps around the pipeline currently being constructed.
- See Also:
build(HttpClientDependencies)
-
build
public RequestPipeline<InputT,OutputT> build(HttpClientDependencies dependencies)
Construct theRequestPipelinewith the currently configured stages.- Parameters:
dependencies-HttpClientDependenciesto supply to factory methods that are interested in it.- Returns:
- Constructed
RequestPipeline. - See Also:
RequestPipeline.execute(Object, RequestExecutionContext)
-
-