Package io.servicetalk.http.api
Class ContentCodingHttpRequesterFilter
- java.lang.Object
-
- io.servicetalk.http.api.ContentCodingHttpRequesterFilter
-
- All Implemented Interfaces:
HttpExecutionStrategyInfluencer,StreamingHttpClientFilterFactory,StreamingHttpConnectionFilterFactory
public final class ContentCodingHttpRequesterFilter extends java.lang.Object implements StreamingHttpClientFilterFactory, StreamingHttpConnectionFilterFactory, HttpExecutionStrategyInfluencer
AStreamingHttpClientFilterthat adds encoding / decoding functionality for requests and responses 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 manipulate the original payload.
-
-
Constructor Summary
Constructors Constructor Description ContentCodingHttpRequesterFilter(java.util.List<ContentCodec> supportedCodings)Enable support of the provided encodings for requests and responses.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StreamingHttpClientFiltercreate(FilterableStreamingHttpClient client)Creates aStreamingHttpClientFilterusing the providedStreamingHttpClientFilter.StreamingHttpConnectionFiltercreate(FilterableStreamingHttpConnection connection)Create aStreamingHttpConnectionFilterusing the providedFilterableStreamingHttpConnection.HttpExecutionStrategyinfluenceStrategy(HttpExecutionStrategy strategy)Optionally modify the passedHttpExecutionStrategyto a newHttpExecutionStrategythat suits thisHttpExecutionStrategyInfluencer.-
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.StreamingHttpClientFilterFactory
append, asMultiAddressClientFilter
-
Methods inherited from interface io.servicetalk.http.api.StreamingHttpConnectionFilterFactory
append
-
-
-
-
Constructor Detail
-
ContentCodingHttpRequesterFilter
public ContentCodingHttpRequesterFilter(java.util.List<ContentCodec> supportedCodings)
Enable support of the provided encodings for requests and responses. The order of the codecs provided, matters for the presentation of the header, and may affect selection priority on the receiving endpoint.- Parameters:
supportedCodings- the codecs this clients supports to encode/decode requests and responses accordingly and also used to advertise to the server.
-
-
Method Detail
-
create
public StreamingHttpClientFilter create(FilterableStreamingHttpClient client)
Description copied from interface:StreamingHttpClientFilterFactoryCreates aStreamingHttpClientFilterusing the providedStreamingHttpClientFilter.- Specified by:
createin interfaceStreamingHttpClientFilterFactory- Parameters:
client-FilterableStreamingHttpClientto filter- Returns:
StreamingHttpClientFilterusing the providedStreamingHttpClientFilter.
-
create
public StreamingHttpConnectionFilter create(FilterableStreamingHttpConnection connection)
Description copied from interface:StreamingHttpConnectionFilterFactoryCreate aStreamingHttpConnectionFilterusing the providedFilterableStreamingHttpConnection.- Specified by:
createin interfaceStreamingHttpConnectionFilterFactory- Parameters:
connection-FilterableStreamingHttpConnectionto filter- Returns:
StreamingHttpConnectionFilterusing the providedFilterableStreamingHttpConnection.
-
influenceStrategy
public HttpExecutionStrategy influenceStrategy(HttpExecutionStrategy strategy)
Description copied from interface:HttpExecutionStrategyInfluencerOptionally modify the passedHttpExecutionStrategyto a newHttpExecutionStrategythat suits thisHttpExecutionStrategyInfluencer.- Specified by:
influenceStrategyin interfaceHttpExecutionStrategyInfluencer- Parameters:
strategy-HttpExecutionStrategyto influence.- Returns:
HttpExecutionStrategythat suits thisHttpExecutionStrategyInfluencer
-
-