public final class ContentEncodingHttpServiceFilter extends Object implements StreamingHttpServiceFilterFactory
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 to see compressed content for this request/response, and after other filters that expect to see/manipulate the original payload.
| Constructor and Description |
|---|
ContentEncodingHttpServiceFilter(List<BufferEncoder> compressors)
Create a new instance and specify the supported compression (matched against
HttpHeaderNames.ACCEPT_ENCODING). |
ContentEncodingHttpServiceFilter(List<BufferEncoder> compressors,
BufferDecoderGroup decompressors)
Create a new instance and specify the supported decompression (matched against
HttpHeaderNames.CONTENT_ENCODING) and compression (matched against
HttpHeaderNames.ACCEPT_ENCODING). |
| Modifier and Type | Method and Description |
|---|---|
StreamingHttpServiceFilter |
create(StreamingHttpService service)
Create a
StreamingHttpServiceFilter using the provided StreamingHttpService. |
HttpExecutionStrategy |
requiredOffloads() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdefaultStreamingInfluencer, influenceStrategypublic ContentEncodingHttpServiceFilter(List<BufferEncoder> compressors)
HttpHeaderNames.ACCEPT_ENCODING). The order of entries may impact the selection preference.compressors - used to compress server responses if client accepts them.public ContentEncodingHttpServiceFilter(List<BufferEncoder> compressors,
BufferDecoderGroup decompressors)
HttpHeaderNames.CONTENT_ENCODING) and compression (matched against
HttpHeaderNames.ACCEPT_ENCODING). The order of entries may impact the selection preference.compressors - used to compress server responses if client accepts them.decompressors - used to decompress client requests if compressed.public StreamingHttpServiceFilter create(StreamingHttpService service)
StreamingHttpServiceFilterFactoryStreamingHttpServiceFilter using the provided StreamingHttpService.create in interface StreamingHttpServiceFilterFactoryservice - StreamingHttpService to filterStreamingHttpServiceFilter using the provided StreamingHttpService.public HttpExecutionStrategy requiredOffloads()
HttpExecutionStrategyInfluencerThe provided default implementation requests offloading of all operations. Implementations that require no
offloading should be careful to return HttpExecutionStrategies.offloadNone() rather than
HttpExecutionStrategies.offloadNever(). Implementations should avoid returning
HttpExecutionStrategies.defaultStrategy(), instead returning the strategy they require or
HttpExecutionStrategies.offloadAll() if offloading for all paths is required (safe default).
requiredOffloads in interface HttpExecutionStrategyInfluencerrequiredOffloads in interface ExecutionStrategyInfluencer<HttpExecutionStrategy>