Package io.servicetalk.http.api
Interface ReservedBlockingHttpConnection
-
- All Superinterfaces:
java.lang.AutoCloseable
,BlockingHttpConnection
,BlockingHttpRequester
,GracefulAutoCloseable
,HttpRequestFactory
public interface ReservedBlockingHttpConnection extends BlockingHttpConnection
A special type ofBlockingHttpConnection
for 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 ReservedBlockingStreamingHttpConnection
asBlockingStreamingConnection()
Convert thisBlockingHttpConnection
to theBlockingStreamingHttpConnection
API.default ReservedHttpConnection
asConnection()
Convert thisBlockingHttpConnection
to theHttpConnection
API.ReservedStreamingHttpConnection
asStreamingConnection()
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, 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.Exception
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:
java.lang.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
default ReservedHttpConnection 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
default ReservedBlockingStreamingHttpConnection 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
.
-
-