Class ContentCodingHttpServiceFilter
- All Implemented Interfaces:
HttpExecutionStrategyInfluencer
,StreamingHttpServiceFilterFactory
,ExecutionStrategyInfluencer<HttpExecutionStrategy>
StreamingHttpService
that adds encoding / decoding functionality for responses and requests respectively,
as these are specified by the spec
Content-Encoding.
Append this filter before others that are expected to see compressed content for this request/response, and after other filters that expect to see/manipulate the original payload.
-
Constructor Summary
ConstructorDescriptionContentCodingHttpServiceFilter
(List<ContentCodec> supportedCodings) Deprecated.Enable support of the provided encodings for this server's responses.ContentCodingHttpServiceFilter
(List<ContentCodec> supportedRequestCodings, List<ContentCodec> supportedResponseCodings) Deprecated.Enable support of the provided encodings for both client requests and server responses. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(StreamingHttpService service) Deprecated.Create aStreamingHttpServiceFilter
using the providedStreamingHttpService
.Deprecated.Return anExecutionStrategy
that describes the offloads required by the influencer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.servicetalk.http.api.HttpExecutionStrategyInfluencer
influenceStrategy
-
Constructor Details
-
ContentCodingHttpServiceFilter
Deprecated.Enable support of the provided encodings for this server's responses. The encodings will be used for server responses compression where enabled and matched with client ones.Client requests that have compressed payloads will be rejected. To enable support of compressed requests, see
ContentCodingHttpServiceFilter(List, List)
.- Parameters:
supportedCodings
- the codecs used to compress responses when allowed.
-
ContentCodingHttpServiceFilter
public ContentCodingHttpServiceFilter(List<ContentCodec> supportedRequestCodings, List<ContentCodec> supportedResponseCodings) Deprecated.Enable support of the provided encodings for both client requests and server responses. The encodings can differ for requests and responses, allowing a server that supports different compressions for requests and different ones for responses.To disable support of compressed requests use an
Collections.emptyList()
for thesupportedRequestCodings
param or useContentCodingHttpServiceFilter(List)
constructor instead.The order of the codecs provided, affect selection priority alongside the order of the incoming accept-encoding header from the client.
- Parameters:
supportedRequestCodings
- the codecs used to decompress client requests if compressed.supportedResponseCodings
- the codecs used to compress server responses if client accepts them.
-
-
Method Details
-
create
Deprecated.Description copied from interface:StreamingHttpServiceFilterFactory
Create aStreamingHttpServiceFilter
using the providedStreamingHttpService
.- Specified by:
create
in interfaceStreamingHttpServiceFilterFactory
- Parameters:
service
-StreamingHttpService
to filter- Returns:
StreamingHttpServiceFilter
using the providedStreamingHttpService
.
-
requiredOffloads
Deprecated.Description copied from interface:HttpExecutionStrategyInfluencer
Return anExecutionStrategy
that describes the offloads required by the influencer.The provided default implementation requests offloading of all operations. Implementations that require no offloading should be careful to return
HttpExecutionStrategies.offloadNone()
rather thanHttpExecutionStrategies.offloadNever()
. Implementations should avoid returningHttpExecutionStrategies.defaultStrategy()
, instead returning the strategy they require orHttpExecutionStrategies.offloadAll()
if offloading for all paths is required (safe default).- Specified by:
requiredOffloads
in interfaceExecutionStrategyInfluencer<HttpExecutionStrategy>
- Specified by:
requiredOffloads
in interfaceHttpExecutionStrategyInfluencer
- Returns:
- the
ExecutionStrategy
required by the influencer.
-
ContentEncodingHttpServiceFilter
.