public interface BlockingHttpClient extends BlockingHttpRequester
HttpClient but with synchronous/blocking APIs instead of asynchronous APIs.| Modifier and Type | Method and Description |
|---|---|
default BlockingStreamingHttpClient |
asBlockingStreamingClient()
Convert this
BlockingHttpClient to the BlockingStreamingHttpClient API. |
default HttpClient |
asClient()
Convert this
BlockingHttpClient to the HttpClient API. |
StreamingHttpClient |
asStreamingClient()
Convert this
BlockingHttpClient to the StreamingHttpClient API. |
ReservedBlockingHttpConnection |
reserveConnection(HttpRequestMetaData metaData)
Reserve a
BlockingHttpConnection based on provided HttpRequestMetaData. |
close, executionContext, httpResponseFactory, requestReservedBlockingHttpConnection reserveConnection(HttpRequestMetaData metaData) throws Exception
BlockingHttpConnection based on provided HttpRequestMetaData.
If a new connection should be opened instead of potentially reusing an already established one, the
HttpContextKeys.HTTP_FORCE_NEW_CONNECTION must be set.
metaData - Allows the underlying layers to know what BlockingHttpConnections are valid to
reserve for future requests with the same HttpRequestMetaData.
For example this may provide some insight into shard or other info.ReservedBlockingHttpConnection.Exception - if a exception occurs during the reservation process.HttpContextKeys.HTTP_FORCE_NEW_CONNECTIONStreamingHttpClient asStreamingClient()
BlockingHttpClient to the StreamingHttpClient API.StreamingHttpClient representation of this BlockingHttpClient.default HttpClient asClient()
BlockingHttpClient to the HttpClient API.HttpClient representation of this BlockingHttpClient.default BlockingStreamingHttpClient asBlockingStreamingClient()
BlockingHttpClient to the BlockingStreamingHttpClient API.BlockingStreamingHttpClient representation of this BlockingHttpClient.