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. |
default ReservedBlockingHttpConnection |
reserveConnection(HttpExecutionStrategy strategy,
HttpRequestMetaData metaData)
Deprecated.
Use
reserveConnection(HttpRequestMetaData). If an HttpExecutionStrategy needs to be
altered, provide a value for HttpContextKeys.HTTP_EXECUTION_STRATEGY_KEY in the
request context. |
ReservedBlockingHttpConnection |
reserveConnection(HttpRequestMetaData metaData)
Reserve a
BlockingHttpConnection based on provided HttpRequestMetaData. |
close, executionContext, httpResponseFactory, requestHttpResponse request(HttpRequest request) throws Exception
request.request in interface BlockingHttpRequesterrequest - 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.@Deprecated default ReservedBlockingHttpConnection reserveConnection(HttpExecutionStrategy strategy, HttpRequestMetaData metaData) throws Exception
reserveConnection(HttpRequestMetaData). If an HttpExecutionStrategy needs to be
altered, provide a value for HttpContextKeys.HTTP_EXECUTION_STRATEGY_KEY in the
request context.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 an 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.