U - the type of address before resolution (unresolved address)R - the type of address after resolution (resolved address)public class DelegatingMultiAddressHttpClientBuilder<U,R> extends Object implements MultiAddressHttpClientBuilder<U,R>
MultiAddressHttpClientBuilder that delegates all methods to another MultiAddressHttpClientBuilder.MultiAddressHttpClientBuilder.SingleAddressInitializer<U,R>| Constructor and Description |
|---|
DelegatingMultiAddressHttpClientBuilder(MultiAddressHttpClientBuilder<U,R> delegate)
Create a new instance.
|
public DelegatingMultiAddressHttpClientBuilder(MultiAddressHttpClientBuilder<U,R> delegate)
delegate - MultiAddressHttpClientBuilder to which all methods are delegated.protected final MultiAddressHttpClientBuilder<U,R> delegate()
MultiAddressHttpClientBuilder delegate.MultiAddressHttpClientBuilder.public String toString()
toString in class Objectpublic MultiAddressHttpClientBuilder<U,R> ioExecutor(IoExecutor ioExecutor)
IoExecutor for all clients created from this builder.ioExecutor in interface MultiAddressHttpClientBuilder<U,R>ioExecutor - IoExecutor to use.this.public MultiAddressHttpClientBuilder<U,R> executor(Executor executor)
Executor for all clients created from this builder.executor in interface MultiAddressHttpClientBuilder<U,R>executor - IoExecutor to use.this.public MultiAddressHttpClientBuilder<U,R> executionStrategy(HttpExecutionStrategy strategy)
MultiAddressHttpClientBuilderHttpExecutionStrategy to be used for client callbacks when executing client requests for all
clients created from this builder.
Provides the base execution strategy for all clients created from this builder and the default strategy for
the SingleAddressHttpClientBuilder used to construct client instances. The
MultiAddressHttpClientBuilder.initializer(SingleAddressInitializer) may be used for some customization of the execution strategy for a
specific single address client instance, but may not reduce the offloading to be performed. Specifically, the
initializer may introduce additional offloading via
SingleAddressHttpClientBuilder.executionStrategy(HttpExecutionStrategy) and may add filters which
influence the computed execution strategy.
Specifying an execution strategy will affect the offloading used during the execution of client requests:
HttpExecutionStrategies.defaultStrategy()
SingleAddressHttpClientBuilder instances generated will also have default strategy.
HttpExecutionStrategies.offloadNone()
(or deprecated HttpExecutionStrategies.offloadNever())
SingleAddressHttpClientBuilder instances created by the client will have a strategy of
HttpExecutionStrategies.offloadNone(). HttpExecutionStrategies.offloadNone() execution
strategy requires that filters and asynchronous callbacks
must not ever block during the execution of client
requests. An initializer may override to add offloads using
SingleAddressHttpClientBuilder.executionStrategy(HttpExecutionStrategy).
HttpExecutionStrategies.customStrategyBuilder()) or
HttpExecutionStrategies.offloadAll()
SingleAddressHttpClientBuilder instances created by the client will start with the provided
strategy and may add additional offloading as required by added filters.
executionStrategy in interface MultiAddressHttpClientBuilder<U,R>strategy - HttpExecutionStrategy to use. If callbacks to the application code may block then those
callbacks must request to be offloaded.this.HttpExecutionStrategiespublic MultiAddressHttpClientBuilder<U,R> bufferAllocator(BufferAllocator allocator)
BufferAllocator for all clients created from this builder.bufferAllocator in interface MultiAddressHttpClientBuilder<U,R>allocator - BufferAllocator to use.this.public MultiAddressHttpClientBuilder<U,R> headersFactory(HttpHeadersFactory headersFactory)
MultiAddressHttpClientBuilderHttpHeadersFactory to be used for creating HttpHeaders for new requests.headersFactory in interface MultiAddressHttpClientBuilder<U,R>headersFactory - HttpHeadersFactory to be used for creating HttpHeaders for new requeststhispublic MultiAddressHttpClientBuilder<U,R> initializer(MultiAddressHttpClientBuilder.SingleAddressInitializer<U,R> initializer)
MultiAddressHttpClientBuilderStreamingHttpClient that is built.initializer in interface MultiAddressHttpClientBuilder<U,R>initializer - Initializes the SingleAddressHttpClientBuilder used to build new
StreamingHttpClients. See MultiAddressHttpClientBuilder.executionStrategy(HttpExecutionStrategy) for discussion of
restrictions on the use of SingleAddressHttpClientBuilder.executionStrategy(HttpExecutionStrategy)
within an initializer.thispublic MultiAddressHttpClientBuilder<U,R> followRedirects(RedirectConfig config)
MultiAddressHttpClientBuilderfollowRedirects in interface MultiAddressHttpClientBuilder<U,R>config - RedirectConfig to configure redirection behavior. It can be used to tune what requests
should follow redirects and which parts of the original request (headers/payload body/trailers) should be
redirected to non-relative locations.this.RedirectConfigBuilderpublic HttpClient build()
HttpClient.HttpClientpublic StreamingHttpClient buildStreaming()
StreamingHttpClient.StreamingHttpClientpublic BlockingHttpClient buildBlocking()
BlockingHttpClient.BlockingHttpClientpublic BlockingStreamingHttpClient buildBlockingStreaming()
BlockingStreamingHttpClient.BlockingStreamingHttpClient