Package io.servicetalk.http.api
Interface ReservedBlockingHttpConnection
- All Superinterfaces:
AutoCloseable
,BlockingHttpConnection
,BlockingHttpRequester
,GracefulAutoCloseable
,HttpRequestFactory
A special type of
BlockingHttpConnection
for the exclusive use of the caller of
BlockingHttpClient.reserveConnection(HttpRequestMetaData)
.-
Method Summary
Modifier and TypeMethodDescriptionConvert thisBlockingHttpConnection
to theBlockingStreamingHttpConnection
API.default ReservedHttpConnection
Convert thisBlockingHttpConnection
to theHttpConnection
API.Convert thisBlockingHttpConnection
to theStreamingHttpConnection
API.void
release()
Releases this reservedBlockingHttpConnection
to be used for subsequent requests.Methods inherited from interface io.servicetalk.http.api.BlockingHttpConnection
connectionContext, transportEventIterable
Methods inherited from interface io.servicetalk.http.api.BlockingHttpRequester
close, executionContext, httpResponseFactory, request
Methods inherited from interface io.servicetalk.concurrent.GracefulAutoCloseable
closeGracefully
-
Method Details
-
release
Releases this reservedBlockingHttpConnection
to be used for subsequent requests. This method must be idempotent, i.e. calling multiple times must not have side-effects.- Throws:
Exception
- if any exception occurs during releasing.
-
asStreamingConnection
ReservedStreamingHttpConnection asStreamingConnection()Description copied from interface:BlockingHttpConnection
Convert thisBlockingHttpConnection
to theStreamingHttpConnection
API.Note that the resulting
StreamingHttpConnection
may still be subject to any blocking, in memory aggregation, and other behavior as thisBlockingHttpConnection
.- Specified by:
asStreamingConnection
in interfaceBlockingHttpConnection
- Returns:
- a
StreamingHttpConnection
representation of thisBlockingHttpConnection
.
-
asConnection
Description copied from interface:BlockingHttpConnection
Convert thisBlockingHttpConnection
to theHttpConnection
API.Note that the resulting
HttpConnection
may still be subject to any blocking, in memory aggregation, and other behavior as thisBlockingHttpConnection
.- Specified by:
asConnection
in interfaceBlockingHttpConnection
- Returns:
- a
HttpConnection
representation of thisBlockingHttpConnection
.
-
asBlockingStreamingConnection
Description copied from interface:BlockingHttpConnection
Convert thisBlockingHttpConnection
to theBlockingStreamingHttpConnection
API.Note that the resulting
BlockingStreamingHttpConnection
may still be subject to in memory aggregation and other behavior as thisBlockingHttpConnection
.- Specified by:
asBlockingStreamingConnection
in interfaceBlockingHttpConnection
- Returns:
- a
BlockingStreamingHttpConnection
representation of thisBlockingHttpConnection
.
-