public interface StreamingHttpClient extends FilterableStreamingHttpClient, GracefulAutoCloseable
HttpClient
but that accepts StreamingHttpRequest
and returns
StreamingHttpResponse
.executionContext, httpResponseFactory, request
connect, delete, get, head, newRequest, options, patch, post, trace
onClose
closeAsync, closeAsyncGracefully
Single<StreamingHttpResponse> request(StreamingHttpRequest request)
request
.request
- the request to send.Single<ReservedStreamingHttpConnection> reserveConnection(HttpRequestMetaData metaData)
StreamingHttpConnection
based on provided HttpRequestMetaData
.metaData
- Allows the underlying layers to know what StreamingHttpConnection
s 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.Single<ReservedStreamingHttpConnection> reserveConnection(HttpExecutionStrategy strategy, HttpRequestMetaData metaData)
FilterableStreamingHttpClient
StreamingHttpConnection
based on provided HttpRequestMetaData
.reserveConnection
in interface FilterableStreamingHttpClient
strategy
- HttpExecutionStrategy
to use.metaData
- Allows the underlying layers to know what StreamingHttpConnection
s 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.HttpClient asClient()
StreamingHttpClient
to the HttpClient
API.
This API is provided for convenience. It is recommended that
filters are implemented using the StreamingHttpClient
asynchronous API for maximum portability.
HttpClient
representation of this StreamingHttpRequester
.BlockingStreamingHttpClient asBlockingStreamingClient()
StreamingHttpClient
to the BlockingStreamingHttpClient
API.
This API is provided for convenience for a more familiar sequential programming model. It is recommended that
filters are implemented using the StreamingHttpClient
asynchronous API for maximum portability.
BlockingStreamingHttpClient
representation of this StreamingHttpClient
.BlockingHttpClient asBlockingClient()
StreamingHttpClient
to the BlockingHttpClient
API.
This API is provided for convenience for a more familiar sequential programming model. It is recommended that
filters are implemented using the StreamingHttpClient
asynchronous API for maximum portability.
BlockingHttpClient
representation of this StreamingHttpClient
.default void close() throws java.lang.Exception
close
in interface java.lang.AutoCloseable
java.lang.Exception
default void closeGracefully() throws java.lang.Exception
GracefulAutoCloseable
AutoCloseable.close()
, but attempts to cleanup state before
abruptly closing. This provides a hint that implementations can use to stop accepting new work and finish in
flight work. This method is implemented on a "best effort" basis and may be equivalent to AutoCloseable.close()
.
Note: Implementations may or may not apply a timeout for this operation to complete, if a caller does not
want to wait indefinitely, and are unsure if the implementation applies a timeout, it is advisable to apply a
timeout and force a call to AutoCloseable.close()
.
closeGracefully
in interface GracefulAutoCloseable
java.lang.Exception
- if graceful closure failed.