Package io.servicetalk.http.api
Interface ReservedBlockingHttpConnection
-
- All Superinterfaces:
java.lang.AutoCloseable,BlockingHttpConnection,BlockingHttpRequester,GracefulAutoCloseable,HttpRequestFactory
public interface ReservedBlockingHttpConnection extends BlockingHttpConnection
A special type ofBlockingHttpConnectionfor the exclusive use of the caller ofBlockingHttpClient.reserveConnection(HttpRequestMetaData)andBlockingHttpClient.reserveConnection(HttpExecutionStrategy, HttpRequestMetaData).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ReservedBlockingStreamingHttpConnectionasBlockingStreamingConnection()Convert thisBlockingHttpConnectionto theBlockingStreamingHttpConnectionAPI.default ReservedHttpConnectionasConnection()Convert thisBlockingHttpConnectionto theHttpConnectionAPI.ReservedStreamingHttpConnectionasStreamingConnection()Convert thisBlockingHttpConnectionto theStreamingHttpConnectionAPI.voidrelease()Releases this reservedBlockingHttpConnectionto be used for subsequent requests.-
Methods inherited from interface io.servicetalk.http.api.BlockingHttpConnection
connectionContext, request, transportEventIterable
-
Methods inherited from interface io.servicetalk.http.api.BlockingHttpRequester
close, executionContext, httpResponseFactory, request
-
Methods inherited from interface io.servicetalk.concurrent.GracefulAutoCloseable
closeGracefully
-
-
-
-
Method Detail
-
release
void release() throws java.lang.ExceptionReleases this reservedBlockingHttpConnectionto be used for subsequent requests. This method must be idempotent, i.e. calling multiple times must not have side-effects.- Throws:
java.lang.Exception- if any exception occurs during releasing.
-
asStreamingConnection
ReservedStreamingHttpConnection asStreamingConnection()
Description copied from interface:BlockingHttpConnectionConvert thisBlockingHttpConnectionto theStreamingHttpConnectionAPI.Note that the resulting
StreamingHttpConnectionmay still be subject to any blocking, in memory aggregation, and other behavior as thisBlockingHttpConnection.- Specified by:
asStreamingConnectionin interfaceBlockingHttpConnection- Returns:
- a
StreamingHttpConnectionrepresentation of thisBlockingHttpConnection.
-
asConnection
default ReservedHttpConnection asConnection()
Description copied from interface:BlockingHttpConnectionConvert thisBlockingHttpConnectionto theHttpConnectionAPI.Note that the resulting
HttpConnectionmay still be subject to any blocking, in memory aggregation, and other behavior as thisBlockingHttpConnection.- Specified by:
asConnectionin interfaceBlockingHttpConnection- Returns:
- a
HttpConnectionrepresentation of thisBlockingHttpConnection.
-
asBlockingStreamingConnection
default ReservedBlockingStreamingHttpConnection asBlockingStreamingConnection()
Description copied from interface:BlockingHttpConnectionConvert thisBlockingHttpConnectionto theBlockingStreamingHttpConnectionAPI.Note that the resulting
BlockingStreamingHttpConnectionmay still be subject to in memory aggregation and other behavior as thisBlockingHttpConnection.- Specified by:
asBlockingStreamingConnectionin interfaceBlockingHttpConnection- Returns:
- a
BlockingStreamingHttpConnectionrepresentation of thisBlockingHttpConnection.
-
-