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 ReservedBlockingHttpConnectionConvert thisHttpConnectionto theBlockingHttpConnectionAPI.Convert thisHttpConnectionto theBlockingStreamingHttpConnectionAPI.Convert thisHttpConnectionto theStreamingHttpConnectionAPI.Releases this reservedReservedHttpConnectionto be used for subsequent requests.Methods inherited from interface io.servicetalk.concurrent.api.AsyncCloseable
closeAsync, closeAsyncGracefullyMethods inherited from interface io.servicetalk.http.api.HttpConnection
connectionContext, transportEventStreamMethods 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
-
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
Description copied from interface:HttpConnectionConvert thisHttpConnectionto theBlockingStreamingHttpConnectionAPI.- Specified by:
asBlockingStreamingConnectionin interfaceHttpConnection- Returns:
- a
BlockingStreamingHttpConnectionrepresentation of thisHttpConnection.
-
asBlockingConnection
Description copied from interface:HttpConnectionConvert thisHttpConnectionto theBlockingHttpConnectionAPI.- Specified by:
asBlockingConnectionin interfaceHttpConnection- Returns:
- a
BlockingHttpConnectionrepresentation of thisHttpConnection.
-