public final class HttpApiConversions
extends java.lang.Object
StreamingHttpService
.Modifier and Type | Class and Description |
---|---|
static interface |
HttpApiConversions.ServiceAdapterHolder
A holder for
StreamingHttpService that adapts another service to the streaming programming model. |
public static ReservedHttpConnection toReservedConnection(ReservedStreamingHttpConnection original, HttpExecutionStrategyInfluencer influencer)
ReservedStreamingHttpConnection
to ReservedHttpConnection
.original
- ReservedStreamingHttpConnection
to convert.influencer
- HttpExecutionStrategyInfluencer
to use to derive the strategy of the returned
ReservedHttpConnection
public static ReservedBlockingHttpConnection toReservedBlockingConnection(ReservedStreamingHttpConnection original, HttpExecutionStrategyInfluencer influencer)
ReservedStreamingHttpConnection
to ReservedBlockingHttpConnection
.original
- ReservedStreamingHttpConnection
to convert.influencer
- HttpExecutionStrategyInfluencer
to use to derive the strategy of the returned
ReservedBlockingHttpConnection
public static ReservedBlockingStreamingHttpConnection toReservedBlockingStreamingConnection(ReservedStreamingHttpConnection original, HttpExecutionStrategyInfluencer influencer)
ReservedStreamingHttpConnection
to ReservedBlockingStreamingHttpConnection
.original
- ReservedStreamingHttpConnection
to convert.influencer
- HttpExecutionStrategyInfluencer
to use to derive the strategy of the returned
ReservedBlockingStreamingHttpConnection
public static HttpConnection toConnection(StreamingHttpConnection original, HttpExecutionStrategyInfluencer influencer)
StreamingHttpConnection
to HttpConnection
.original
- StreamingHttpConnection
to convert.influencer
- HttpExecutionStrategyInfluencer
to use to derive the strategy of the returned
HttpConnection
public static BlockingHttpConnection toBlockingConnection(StreamingHttpConnection original, HttpExecutionStrategyInfluencer influencer)
StreamingHttpConnection
to BlockingHttpConnection
.original
- StreamingHttpConnection
to convert.influencer
- HttpExecutionStrategyInfluencer
to use to derive the strategy of the returned
BlockingHttpConnection
public static BlockingStreamingHttpConnection toBlockingStreamingConnection(StreamingHttpConnection original, HttpExecutionStrategyInfluencer influencer)
StreamingHttpConnection
to BlockingStreamingHttpConnection
.original
- StreamingHttpConnection
to convert.influencer
- HttpExecutionStrategyInfluencer
to use to derive the strategy of the returned
BlockingStreamingHttpConnection
public static HttpClient toClient(StreamingHttpClient original, HttpExecutionStrategyInfluencer influencer)
StreamingHttpClient
to HttpClient
.original
- StreamingHttpClient
to convert.influencer
- HttpExecutionStrategyInfluencer
to use to derive the strategy of the returned
HttpClient
public static BlockingHttpClient toBlockingClient(StreamingHttpClient original, HttpExecutionStrategyInfluencer influencer)
StreamingHttpClient
to BlockingHttpClient
.original
- StreamingHttpClient
to convert.influencer
- HttpExecutionStrategyInfluencer
to use to derive the strategy of the returned
BlockingHttpClient
public static BlockingStreamingHttpClient toBlockingStreamingClient(StreamingHttpClient original, HttpExecutionStrategyInfluencer influencer)
StreamingHttpClient
to BlockingStreamingHttpClient
.original
- StreamingHttpClient
to convert.influencer
- HttpExecutionStrategyInfluencer
to use to derive the strategy of the returned
BlockingStreamingHttpClient
public static HttpApiConversions.ServiceAdapterHolder toStreamingHttpService(HttpService service, HttpExecutionStrategyInfluencer influencer)
HttpService
to a StreamingHttpService
.service
- The HttpService
to convert.influencer
- HttpExecutionStrategyInfluencer
to influence the strategy for invoking the resulting
StreamingHttpService
.HttpApiConversions.ServiceAdapterHolder
containing the service adapted to the streaming programming model.public static HttpApiConversions.ServiceAdapterHolder toStreamingHttpService(BlockingStreamingHttpService service, HttpExecutionStrategyInfluencer influencer)
BlockingStreamingHttpService
to a StreamingHttpService
.service
- The BlockingStreamingHttpService
to convert.influencer
- HttpExecutionStrategyInfluencer
to influence the strategy for invoking the resulting
StreamingHttpService
.HttpApiConversions.ServiceAdapterHolder
containing the service adapted to the streaming programming model.public static HttpApiConversions.ServiceAdapterHolder toStreamingHttpService(BlockingHttpService service, HttpExecutionStrategyInfluencer influencer)
BlockingStreamingHttpService
to a StreamingHttpService
.service
- The BlockingStreamingHttpService
to convert.influencer
- HttpExecutionStrategyInfluencer
to influence the strategy for invoking the resulting
StreamingHttpService
.HttpApiConversions.ServiceAdapterHolder
containing the service adapted to the streaming programming model.public static boolean isSafeToAggregate(HttpMetaData metadata)
metadata
- The request/response to check.true
is the request/response payload is safe to aggregate, false
otherwise.public static boolean mayHaveTrailers(HttpMetaData metadata)
metadata
- The request/response to check.true
is the request/response payload may have trailers, false
otherwise.public static BlockingHttpService toBlockingHttpService(StreamingHttpService service)
StreamingHttpService
to a BlockingHttpService
.service
- The StreamingHttpService
to convert.public static HttpService toHttpService(StreamingHttpService service)
StreamingHttpService
to a HttpService
.service
- The StreamingHttpService
to convert.public static BlockingStreamingHttpService toBlockingStreamingHttpService(StreamingHttpService service)
StreamingHttpService
to a BlockingStreamingHttpService
.service
- The StreamingHttpService
to convert.