Package io.servicetalk.http.api
Interface ReservedHttpConnection
-
- All Superinterfaces:
AsyncCloseable
,java.lang.AutoCloseable
,GracefulAutoCloseable
,HttpConnection
,HttpRequester
,HttpRequestFactory
,ListenableAsyncCloseable
public interface ReservedHttpConnection extends HttpConnection
A special type ofHttpConnection
for the exclusive use of the caller ofHttpClient.reserveConnection(HttpRequestMetaData)
andHttpClient.reserveConnection(HttpExecutionStrategy, HttpRequestMetaData)
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ReservedBlockingHttpConnection
asBlockingConnection()
Convert thisHttpConnection
to theBlockingHttpConnection
API.default ReservedBlockingStreamingHttpConnection
asBlockingStreamingConnection()
Convert thisHttpConnection
to theBlockingStreamingHttpConnection
API.ReservedStreamingHttpConnection
asStreamingConnection()
Convert thisHttpConnection
to theStreamingHttpConnection
API.Completable
releaseAsync()
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, request, 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
-
-
-
-
Method Detail
-
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
default ReservedBlockingStreamingHttpConnection asBlockingStreamingConnection()
Description copied from interface:HttpConnection
Convert thisHttpConnection
to theBlockingStreamingHttpConnection
API.- Specified by:
asBlockingStreamingConnection
in interfaceHttpConnection
- Returns:
- a
BlockingStreamingHttpConnection
representation of thisHttpConnection
.
-
asBlockingConnection
default ReservedBlockingHttpConnection asBlockingConnection()
Description copied from interface:HttpConnection
Convert thisHttpConnection
to theBlockingHttpConnection
API.- Specified by:
asBlockingConnection
in interfaceHttpConnection
- Returns:
- a
BlockingHttpConnection
representation of thisHttpConnection
.
-
-