Package io.servicetalk.http.api
Interface BlockingStreamingHttpConnection
-
- All Superinterfaces:
java.lang.AutoCloseable,BlockingStreamingHttpRequester,BlockingStreamingHttpRequestFactory,GracefulAutoCloseable
- All Known Subinterfaces:
ReservedBlockingStreamingHttpConnection
public interface BlockingStreamingHttpConnection extends BlockingStreamingHttpRequester
The equivalent ofStreamingHttpConnectionbut with synchronous/blocking APIs instead of asynchronous APIs.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default BlockingHttpConnectionasBlockingConnection()Convert thisBlockingStreamingHttpConnectionto theBlockingHttpConnectionAPI.default HttpConnectionasConnection()Convert thisBlockingStreamingHttpConnectionto theHttpConnectionAPI.StreamingHttpConnectionasStreamingConnection()Convert thisBlockingStreamingHttpConnectionto theStreamingHttpConnectionAPI.HttpConnectionContextconnectionContext()Get theHttpConnectionContext.BlockingStreamingHttpResponserequest(BlockingStreamingHttpRequest request)Send arequest.<T> BlockingIterable<? extends T>transportEventIterable(HttpEventKey<T> eventKey)Returns aBlockingIterablethat gives the current value of the setting as well as subsequent changes to the setting value as long as thePublisherSource.Subscriberhas expressed enough demand.-
Methods inherited from interface io.servicetalk.http.api.BlockingStreamingHttpRequester
close, executionContext, httpResponseFactory, request
-
Methods inherited from interface io.servicetalk.http.api.BlockingStreamingHttpRequestFactory
connect, delete, get, head, newRequest, options, patch, post, put, trace
-
Methods inherited from interface io.servicetalk.concurrent.GracefulAutoCloseable
closeGracefully
-
-
-
-
Method Detail
-
request
BlockingStreamingHttpResponse request(BlockingStreamingHttpRequest request) throws java.lang.Exception
Send arequest.- Parameters:
request- the request to send.- Returns:
- The response.
- Throws:
java.lang.Exception- if an exception occurs during the request processing.
-
connectionContext
HttpConnectionContext connectionContext()
Get theHttpConnectionContext.- Returns:
- the
HttpConnectionContext.
-
transportEventIterable
<T> BlockingIterable<? extends T> transportEventIterable(HttpEventKey<T> eventKey)
Returns aBlockingIterablethat gives the current value of the setting as well as subsequent changes to the setting value as long as thePublisherSource.Subscriberhas 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.
- Type Parameters:
T- Type of the setting value.- Parameters:
eventKey- Name of the event to fetch.- Returns:
BlockingIterablefor the setting values.
-
asStreamingConnection
StreamingHttpConnection asStreamingConnection()
Convert thisBlockingStreamingHttpConnectionto theStreamingHttpConnectionAPI.Note that the resulting
StreamingHttpConnectionmay still be subject to any blocking, in memory aggregation, and other behavior as thisBlockingStreamingHttpConnection.- Returns:
- a
StreamingHttpConnectionrepresentation of thisBlockingStreamingHttpConnection.
-
asConnection
default HttpConnection asConnection()
Convert thisBlockingStreamingHttpConnectionto theHttpConnectionAPI.Note that the resulting
HttpConnectionmay still be subject to any blocking, in memory aggregation, and other behavior as thisBlockingStreamingHttpConnection.- Returns:
- a
HttpConnectionrepresentation of thisBlockingStreamingHttpConnection.
-
asBlockingConnection
default BlockingHttpConnection asBlockingConnection()
Convert thisBlockingStreamingHttpConnectionto theBlockingHttpConnectionAPI.Note that the resulting
BlockingHttpConnectionmay still be subject to in memory aggregation and other behavior as thisBlockingStreamingHttpConnection.- Returns:
- a
BlockingHttpConnectionrepresentation of thisBlockingStreamingHttpConnection.
-
-