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. |
HttpResponse |
request(HttpRequest request)
Send a
request. |
ReservedBlockingHttpConnection |
reserveConnection(HttpExecutionStrategy strategy,
HttpRequestMetaData metaData)
Reserve a
BlockingHttpConnection based on provided HttpRequestMetaData. |
ReservedBlockingHttpConnection |
reserveConnection(HttpRequestMetaData metaData)
Reserve a
BlockingHttpConnection based on provided HttpRequestMetaData. |
close, executionContext, httpResponseFactory, requestHttpResponse request(HttpRequest request) throws Exception
request.request - the request to send.Exception - if an exception occurs during the request processing.ReservedBlockingHttpConnection reserveConnection(HttpRequestMetaData metaData) throws Exception
BlockingHttpConnection based on provided HttpRequestMetaData.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.ReservedBlockingHttpConnection reserveConnection(HttpExecutionStrategy strategy, HttpRequestMetaData metaData) throws Exception
BlockingHttpConnection based on provided HttpRequestMetaData.strategy - HttpExecutionStrategy to use.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.StreamingHttpClient 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.