InputT - Currently configured input type to the RequestPipeline.OutputT - Currently configured output type to the RequestPipeline.@Immutable public class RequestPipelineBuilder<InputT,OutputT,D extends HttpClientDependencies> extends Object
RequestPipeline.| Modifier and Type | Method and Description |
|---|---|
static <InputT,OutputT> |
async(Function<HttpAsyncClientDependencies,RequestPipeline<InputT,OutputT>> pipelineFactory)
Convert a synchronous
RequestPipeline factory into a factory that produces a version of the RequestPipeline
that accepts a CompletableFuture and returns a CompletableFuture. |
static <InputT,OutputT> |
async(Supplier<RequestPipeline<InputT,OutputT>> pipelineFactory)
A version of
async(Function) that takes a Supplier |
RequestPipeline<InputT,OutputT> |
build(D dependencies)
Construct the
RequestPipeline with the currently configured stages. |
static <InputT,OutputT> |
firstAsync(Function<HttpAsyncClientDependencies,RequestPipeline<InputT,OutputT>> pipelineFactory)
Factory method to create a
RequestPipelineBuilder with an initial pipeline stage. |
static <InputT,OutputT> |
firstAsync(Supplier<RequestPipeline<InputT,OutputT>> pipelineFactory)
Factory method to create a
RequestPipelineBuilder with an initial pipeline stage.Stages in this pipeline will only
be able to accept an HttpAsyncClientDependencies or HttpClientDependencies. |
static <InputT,OutputT> |
firstSync(Function<HttpSyncClientDependencies,RequestPipeline<InputT,OutputT>> pipelineFactory)
Factory method to create a
RequestPipelineBuilder with an initial pipeline stage. |
static <InputT,OutputT> |
firstSync(Supplier<RequestPipeline<InputT,OutputT>> pipelineFactory)
Factory method to create a
RequestPipelineBuilder with an initial pipeline stage. |
<NewOutputT> |
then(Function<D,RequestPipeline<OutputT,NewOutputT>> pipelineFactory)
Factory method to chain the current
RequestPipelineBuilder with another pipeline stage. |
<NewOutputT> |
then(Supplier<RequestPipeline<OutputT,NewOutputT>> pipelineFactory)
Factory method to chain the current
RequestPipelineBuilder with another pipeline stage. |
<NewInputT,NewOutputT> |
wrap(BiFunction<D,RequestPipeline<InputT,OutputT>,RequestPipeline<NewInputT,NewOutputT>> wrappedFactory)
Factory method to wrap the current
RequestPipelineBuilder with another pipeline stage. |
<NewInputT,NewOutputT> |
wrap(Function<RequestPipeline<InputT,OutputT>,RequestPipeline<NewInputT,NewOutputT>> wrappedFactory)
Factory method to wrap the current
RequestPipelineBuilder with another pipeline stage. |
public static <InputT,OutputT> RequestPipelineBuilder<InputT,OutputT,HttpAsyncClientDependencies> firstAsync(Function<HttpAsyncClientDependencies,RequestPipeline<InputT,OutputT>> pipelineFactory)
RequestPipelineBuilder with an initial pipeline stage. Stages in this pipeline will only
be able to accept an HttpAsyncClientDependencies or HttpClientDependencies.InputT - Input type of pipelineOutputT - Output type of pipeline.pipelineFactory - Factory that can produce a RequestPipeline. Should take an HttpClientDependencies
object as the first parameter to the factory method.build(HttpClientDependencies)public static <InputT,OutputT> RequestPipelineBuilder<InputT,OutputT,HttpAsyncClientDependencies> firstAsync(Supplier<RequestPipeline<InputT,OutputT>> pipelineFactory)
RequestPipelineBuilder with an initial pipeline stage.Stages in this pipeline will only
be able to accept an HttpAsyncClientDependencies or HttpClientDependencies.InputT - Input type of pipelineOutputT - Output type of pipeline.pipelineFactory - Factory that can produce a RequestPipeline. Use this overload when the factory does not
need HttpClientDependencies and should instead take no arguments.build(HttpClientDependencies)public static <InputT,OutputT> RequestPipelineBuilder<InputT,OutputT,HttpSyncClientDependencies> firstSync(Function<HttpSyncClientDependencies,RequestPipeline<InputT,OutputT>> pipelineFactory)
RequestPipelineBuilder with an initial pipeline stage. Stages in this pipeline will only
be able to accept an HttpSyncClientDependencies or HttpClientDependencies.InputT - Input type of pipelineOutputT - Output type of pipeline.pipelineFactory - Factory that can produce a RequestPipeline. Should take an HttpClientDependencies
object as the first parameter to the factory method.build(HttpClientDependencies)public static <InputT,OutputT> RequestPipelineBuilder<InputT,OutputT,HttpSyncClientDependencies> firstSync(Supplier<RequestPipeline<InputT,OutputT>> pipelineFactory)
RequestPipelineBuilder with an initial pipeline stage. Stages in this pipeline will only
be able to accept an HttpSyncClientDependencies or HttpClientDependencies.InputT - Input type of pipelineOutputT - Output type of pipeline.pipelineFactory - Factory that can produce a RequestPipeline. Use this overload when the factory does not
need HttpClientDependencies and should instead take no arguments.build(HttpClientDependencies)public <NewOutputT> RequestPipelineBuilder<InputT,NewOutputT,D> then(Function<D,RequestPipeline<OutputT,NewOutputT>> pipelineFactory)
RequestPipelineBuilder with 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.NewOutputT - New output type of pipelinepipelineFactory - Factory that can produce a RequestPipeline. Should take an HttpClientDependencies
object as the first parameter to the factory method.build(HttpClientDependencies)public static <InputT,OutputT> Function<HttpAsyncClientDependencies,RequestPipeline<CompletableFuture<InputT>,CompletableFuture<OutputT>>> async(Function<HttpAsyncClientDependencies,RequestPipeline<InputT,OutputT>> pipelineFactory)
RequestPipeline factory into a factory that produces a version of the RequestPipeline
that accepts a CompletableFuture and returns a CompletableFuture.InputT - the input type of the original RequestPipelineOutputT - the return type of the original RequestPipelinepipelineFactory - the delegate pipeline factory to wrapRequestPipeline factorypublic static <InputT,OutputT> Function<HttpAsyncClientDependencies,RequestPipeline<CompletableFuture<InputT>,CompletableFuture<OutputT>>> async(Supplier<RequestPipeline<InputT,OutputT>> pipelineFactory)
async(Function) that takes a Supplierasync(Supplier)public <NewOutputT> RequestPipelineBuilder<InputT,NewOutputT,D> then(Supplier<RequestPipeline<OutputT,NewOutputT>> pipelineFactory)
RequestPipelineBuilder with 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.NewOutputT - New output type of pipelinepipelineFactory - Factory that can produce a RequestPipeline. Use this overload when the factory does not
need HttpClientDependencies and should instead take no arguments.build(HttpClientDependencies)public <NewInputT,NewOutputT> RequestPipelineBuilder<NewInputT,NewOutputT,D> wrap(BiFunction<D,RequestPipeline<InputT,OutputT>,RequestPipeline<NewInputT,NewOutputT>> wrappedFactory)
RequestPipelineBuilder with another pipeline stage. The argument to wrap is a
factory that takes an HttpClientDependencies object and a inner RequestPipeline (the current one being
built) as arguments and produces a new RequestPipeline for the wrapper. The wrapper may have entirely different
input and output types, typically it will have the same however.NewOutputT - New output type of pipelinewrappedFactory - BiFunction factory that can produce a RequestPipeline. The arguments to the factory
will be HttpClientDependencies and an inner RequestPipeline.build(HttpClientDependencies)public <NewInputT,NewOutputT> RequestPipelineBuilder<NewInputT,NewOutputT,D> wrap(Function<RequestPipeline<InputT,OutputT>,RequestPipeline<NewInputT,NewOutputT>> wrappedFactory)
RequestPipelineBuilder with another pipeline stage. The argument to wrap is a
factory that takes an inner RequestPipeline (the current one being built) as an argument and produces a new RequestPipeline for the wrapper. The wrapper may have entirely different input and output types, typically it will have
the same however.NewOutputT - New output type of pipelinewrappedFactory - Function factory that can produce a RequestPipeline. The argument to the factory
will be an inner RequestPipeline.build(HttpClientDependencies)public RequestPipeline<InputT,OutputT> build(D dependencies)
RequestPipeline with the currently configured stages.dependencies - HttpClientDependencies to supply to factory methods that are interested in it.RequestPipeline.RequestPipeline.execute(Object, RequestExecutionContext)Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.