Package io.servicetalk.http.api
Interface HttpConnection
- All Superinterfaces:
AsyncCloseable,AutoCloseable,GracefulAutoCloseable,HttpRequester,HttpRequestFactory,ListenableAsyncCloseable
- All Known Subinterfaces:
ReservedHttpConnection
Represents a single fixed connection to a HTTP server.
-
Method Summary
Modifier and TypeMethodDescriptiondefault BlockingHttpConnectionConvert thisHttpConnectionto theBlockingHttpConnectionAPI.default BlockingStreamingHttpConnectionConvert thisHttpConnectionto theBlockingStreamingHttpConnectionAPI.Convert thisHttpConnectionto theStreamingHttpConnectionAPI.Get theHttpConnectionContext.<T> Publisher<? extends T>transportEventStream(HttpEventKey<T> eventKey) Returns aPublisherthat gives the current value of a transport event as well as subsequent changes to the event value as long as thePublisherSource.Subscriberhas expressed enough demand.Methods inherited from interface io.servicetalk.concurrent.api.AsyncCloseable
closeAsync, closeAsyncGracefullyMethods inherited from interface io.servicetalk.http.api.HttpRequester
close, closeGracefully, executionContext, httpResponseFactory, requestMethods inherited from interface io.servicetalk.http.api.HttpRequestFactory
connect, delete, get, head, newRequest, options, patch, post, put, traceMethods inherited from interface io.servicetalk.concurrent.api.ListenableAsyncCloseable
onClose, onClosing
-
Method Details
-
connectionContext
HttpConnectionContext connectionContext()Get theHttpConnectionContext.- Returns:
- the
HttpConnectionContext.
-
transportEventStream
Returns aPublisherthat gives the current value of a transport event as well as subsequent changes to the event 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 event value.- Parameters:
eventKey- Name of the event to fetch.- Returns:
Publisherfor the event values.
-
asStreamingConnection
StreamingHttpConnection asStreamingConnection()Convert thisHttpConnectionto theStreamingHttpConnectionAPI.- Returns:
- a
StreamingHttpConnectionrepresentation of thisHttpConnection.
-
asBlockingStreamingConnection
Convert thisHttpConnectionto theBlockingStreamingHttpConnectionAPI.- Returns:
- a
BlockingStreamingHttpConnectionrepresentation of thisHttpConnection.
-
asBlockingConnection
Convert thisHttpConnectionto theBlockingHttpConnectionAPI.- Returns:
- a
BlockingHttpConnectionrepresentation of thisHttpConnection.
-