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 ofHttpConnectionfor 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 ReservedBlockingHttpConnectionasBlockingConnection()Convert thisHttpConnectionto theBlockingHttpConnectionAPI.default ReservedBlockingStreamingHttpConnectionasBlockingStreamingConnection()Convert thisHttpConnectionto theBlockingStreamingHttpConnectionAPI.ReservedStreamingHttpConnectionasStreamingConnection()Convert thisHttpConnectionto theStreamingHttpConnectionAPI.CompletablereleaseAsync()Releases this reservedReservedHttpConnectionto 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 reservedReservedHttpConnectionto be used for subsequent requests. This method must be idempotent, i.e. calling multiple times must not have side-effects.- Returns:
- the
Completablethat is notified on releaseAsync.
-
asStreamingConnection
ReservedStreamingHttpConnection asStreamingConnection()
Description copied from interface:HttpConnectionConvert thisHttpConnectionto theStreamingHttpConnectionAPI.- Specified by:
asStreamingConnectionin interfaceHttpConnection- Returns:
- a
StreamingHttpConnectionrepresentation of thisHttpConnection.
-
asBlockingStreamingConnection
default ReservedBlockingStreamingHttpConnection asBlockingStreamingConnection()
Description copied from interface:HttpConnectionConvert thisHttpConnectionto theBlockingStreamingHttpConnectionAPI.- Specified by:
asBlockingStreamingConnectionin interfaceHttpConnection- Returns:
- a
BlockingStreamingHttpConnectionrepresentation of thisHttpConnection.
-
asBlockingConnection
default ReservedBlockingHttpConnection asBlockingConnection()
Description copied from interface:HttpConnectionConvert thisHttpConnectionto theBlockingHttpConnectionAPI.- Specified by:
asBlockingConnectionin interfaceHttpConnection- Returns:
- a
BlockingHttpConnectionrepresentation of thisHttpConnection.
-
-