Package io.servicetalk.http.api
Interface ReservedHttpConnection
- All Superinterfaces:
AsyncCloseable
,AutoCloseable
,GracefulAutoCloseable
,HttpConnection
,HttpRequester
,HttpRequestFactory
,ListenableAsyncCloseable
A special type of
HttpConnection
for the exclusive use of the caller of
HttpClient.reserveConnection(HttpRequestMetaData)
.-
Method Summary
Modifier and TypeMethodDescriptiondefault ReservedBlockingHttpConnection
Convert thisHttpConnection
to theBlockingHttpConnection
API.Convert thisHttpConnection
to theBlockingStreamingHttpConnection
API.Convert thisHttpConnection
to theStreamingHttpConnection
API.Releases this reservedReservedHttpConnection
to be used for subsequent requests.Methods inherited from interface io.servicetalk.concurrent.api.AsyncCloseable
closeAsync, closeAsyncGracefully
Methods inherited from interface io.servicetalk.http.api.HttpConnection
close, closeGracefully, connectionContext, transportEventStream
Methods inherited from interface io.servicetalk.http.api.HttpRequester
executionContext, httpResponseFactory, request
Methods inherited from interface io.servicetalk.http.api.HttpRequestFactory
connect, delete, get, head, newRequest, options, patch, post, put, trace
Methods inherited from interface io.servicetalk.concurrent.api.ListenableAsyncCloseable
onClose, onClosing
-
Method Details
-
releaseAsync
Completable releaseAsync()Releases this reservedReservedHttpConnection
to be used for subsequent requests. This method must be idempotent, i.e. calling multiple times must not have side-effects.- Returns:
- the
Completable
that is notified on releaseAsync.
-
asStreamingConnection
ReservedStreamingHttpConnection asStreamingConnection()Description copied from interface:HttpConnection
Convert thisHttpConnection
to theStreamingHttpConnection
API.- Specified by:
asStreamingConnection
in interfaceHttpConnection
- Returns:
- a
StreamingHttpConnection
representation of thisHttpConnection
.
-
asBlockingStreamingConnection
Description copied from interface:HttpConnection
Convert thisHttpConnection
to theBlockingStreamingHttpConnection
API.- Specified by:
asBlockingStreamingConnection
in interfaceHttpConnection
- Returns:
- a
BlockingStreamingHttpConnection
representation of thisHttpConnection
.
-
asBlockingConnection
Description copied from interface:HttpConnection
Convert thisHttpConnection
to theBlockingHttpConnection
API.- Specified by:
asBlockingConnection
in interfaceHttpConnection
- Returns:
- a
BlockingHttpConnection
representation of thisHttpConnection
.
-