public interface BlockingHttpConnection extends BlockingHttpRequester
HttpConnection
but with synchronous/blocking APIs instead of asynchronous APIs.Modifier and Type | Method and Description |
---|---|
default BlockingStreamingHttpConnection |
asBlockingStreamingConnection()
Convert this
BlockingHttpConnection to the BlockingStreamingHttpConnection API. |
default HttpConnection |
asConnection()
Convert this
BlockingHttpConnection to the HttpConnection API. |
StreamingHttpConnection |
asStreamingConnection()
Convert this
BlockingHttpConnection to the StreamingHttpConnection API. |
ConnectionContext |
connectionContext()
Get the
ConnectionContext . |
HttpResponse |
request(HttpRequest request)
Send a
request . |
<T> BlockingIterable<? extends T> |
transportEventIterable(HttpEventKey<T> eventKey)
Returns a
BlockingIterable that gives the current value of the setting as well as subsequent changes to
the setting value as long as the PublisherSource.Subscriber has expressed enough demand. |
close, executionContext, httpResponseFactory, request
connect, delete, get, head, newRequest, options, patch, post, put, trace
closeGracefully
HttpResponse request(HttpRequest request) throws java.lang.Exception
request
.request
- the request to send.java.lang.Exception
- if an exception occurs during the request processing.ConnectionContext connectionContext()
ConnectionContext
.ConnectionContext
.<T> BlockingIterable<? extends T> transportEventIterable(HttpEventKey<T> eventKey)
BlockingIterable
that gives the current value of the setting as well as subsequent changes to
the setting value as long as the PublisherSource.Subscriber
has expressed enough demand.
This is designed for events produced by the transport, and consumed by filters interested in transport behavior which is not directly involved in the data path.
T
- Type of the setting value.eventKey
- Name of the event to fetch.BlockingIterable
for the setting values.StreamingHttpConnection asStreamingConnection()
BlockingHttpConnection
to the StreamingHttpConnection
API.
Note that the resulting StreamingHttpConnection
may still be subject to any blocking, in memory
aggregation, and other behavior as this BlockingHttpConnection
.
StreamingHttpConnection
representation of this BlockingHttpConnection
.default HttpConnection asConnection()
BlockingHttpConnection
to the HttpConnection
API.
Note that the resulting HttpConnection
may still be subject to any blocking, in memory
aggregation, and other behavior as this BlockingHttpConnection
.
HttpConnection
representation of this BlockingHttpConnection
.default BlockingStreamingHttpConnection asBlockingStreamingConnection()
BlockingHttpConnection
to the BlockingStreamingHttpConnection
API.
Note that the resulting BlockingStreamingHttpConnection
may still be subject to in memory
aggregation and other behavior as this BlockingHttpConnection
.
BlockingStreamingHttpConnection
representation of this BlockingHttpConnection
.