public class StreamingHttpClientFilter extends Object implements FilterableStreamingHttpClient
StreamingHttpClient that delegates all methods to a different StreamingHttpClient.| Modifier | Constructor and Description |
|---|---|
protected |
StreamingHttpClientFilter(FilterableStreamingHttpClient delegate)
Create a new instance.
|
protected StreamingHttpClientFilter(FilterableStreamingHttpClient delegate)
delegate - The FilterableStreamingHttpClient to delegate all calls to.public final Single<StreamingHttpResponse> request(StreamingHttpRequest request)
StreamingHttpRequesterrequest.request in interface StreamingHttpRequesterrequest - the request to send.@Deprecated public final Single<StreamingHttpResponse> request(HttpExecutionStrategy strategy, StreamingHttpRequest request)
StreamingHttpRequesterrequest using the specified strategy.request in interface StreamingHttpRequesterstrategy - HttpExecutionStrategy to use for executing the request.request - the request to send.public Single<? extends FilterableReservedStreamingHttpConnection> reserveConnection(HttpRequestMetaData metaData)
FilterableStreamingHttpClientStreamingHttpConnection based on provided HttpRequestMetaData.reserveConnection in interface FilterableStreamingHttpClientmetaData - Allows the underlying layers to know what StreamingHttpConnections are valid to
reserve for future requests with the same HttpRequestMetaData.
For example this may provide some insight into shard or other info.Single that provides the ReservedStreamingHttpConnection upon completion.@Deprecated public Single<? extends FilterableReservedStreamingHttpConnection> reserveConnection(HttpExecutionStrategy strategy, HttpRequestMetaData metaData)
FilterableStreamingHttpClientStreamingHttpConnection based on provided HttpRequestMetaData.reserveConnection in interface FilterableStreamingHttpClientstrategy - HttpExecutionStrategy to use.metaData - Allows the underlying layers to know what StreamingHttpConnections are valid to
reserve for future requests with the same HttpRequestMetaData.
For example this may provide some insight into shard or other info.Single that provides the ReservedStreamingHttpConnection upon completion.public HttpExecutionContext executionContext()
StreamingHttpRequesterHttpExecutionContext used during construction of this object.
Note that the ExecutionContext.ioExecutor() will not necessarily be associated with a specific thread
unless that was how this object was built.
executionContext in interface StreamingHttpRequesterHttpExecutionContext used during construction of this object.public StreamingHttpResponseFactory httpResponseFactory()
StreamingHttpRequesterStreamingHttpResponseFactory.httpResponseFactory in interface StreamingHttpRequesterStreamingHttpResponseFactory.public Completable onClose()
onClose in interface ListenableAsyncCloseablepublic Completable closeAsync()
closeAsync in interface AsyncCloseablepublic Completable closeAsyncGracefully()
closeAsyncGracefully in interface AsyncCloseablepublic StreamingHttpRequest newRequest(HttpRequestMethod method, String requestTarget)
StreamingHttpRequestFactoryHttpRequestFactory.newRequest in interface StreamingHttpRequestFactorymethod - The HttpRequestMethod.requestTarget - The request target.HttpRequestFactory.public String toString()
toString in class Objectprotected final FilterableStreamingHttpClient delegate()
FilterableStreamingHttpClient this method delegates to.FilterableStreamingHttpClient this method delegates to.@Deprecated protected Single<StreamingHttpResponse> request(StreamingHttpRequester delegate, HttpExecutionStrategy strategy, StreamingHttpRequest request)
request(StreamingHttpRequester, StreamingHttpRequest). If an
HttpExecutionStrategy needs to be altered, provide a value for
HttpContextKeys.HTTP_EXECUTION_STRATEGY_KEY in the request context.StreamingHttpRequester on
which to call StreamingHttpRequester.request(HttpExecutionStrategy, StreamingHttpRequest).delegate - The StreamingHttpRequester to delegate requests to.strategy - The HttpExecutionStrategy to use for executing the request.request - The request to delegate.protected Single<StreamingHttpResponse> request(StreamingHttpRequester delegate, StreamingHttpRequest request)
StreamingHttpRequester on
which to call StreamingHttpRequester.request(StreamingHttpRequest).delegate - The StreamingHttpRequester to delegate requests to.request - The request to delegate.