public interface HttpClient extends HttpRequester, GracefulAutoCloseable
HttpConnection instances and distribute calls to HttpRequester.request(HttpRequest) amongst this collection.| Modifier and Type | Method and Description |
|---|---|
default BlockingHttpClient |
asBlockingClient()
Convert this
HttpClient to the BlockingHttpClient API. |
default BlockingStreamingHttpClient |
asBlockingStreamingClient()
Convert this
HttpClient to the BlockingStreamingHttpClient API. |
StreamingHttpClient |
asStreamingClient()
Convert this
HttpClient to the StreamingHttpClient API. |
default void |
close() |
default void |
closeGracefully() |
Single<ReservedHttpConnection> |
reserveConnection(HttpRequestMetaData metaData)
Reserve an
HttpConnection based on provided HttpRequestMetaData. |
executionContext, httpResponseFactory, requestSingle<ReservedHttpConnection> reserveConnection(HttpRequestMetaData metaData)
HttpConnection based on provided HttpRequestMetaData.metaData - Allows the underlying layers to know what HttpConnections 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 ReservedHttpConnection upon completion.StreamingHttpClient asStreamingClient()
HttpClient to the StreamingHttpClient API.StreamingHttpClient representation of this HttpClient.default BlockingStreamingHttpClient asBlockingStreamingClient()
HttpClient to the BlockingStreamingHttpClient API.BlockingStreamingHttpClient representation of this HttpClient.default BlockingHttpClient asBlockingClient()
HttpClient to the BlockingHttpClient API.BlockingHttpClient representation of this HttpClient.default void close()
throws Exception
close in interface AutoCloseableExceptiondefault void closeGracefully()
throws Exception
closeGracefully in interface GracefulAutoCloseableException