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
AStreamingHttpClientFilter
that 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 StreamingHttpClientFilter
create(FilterableStreamingHttpClient client)
Creates aStreamingHttpClientFilter
using the providedStreamingHttpClientFilter
.StreamingHttpConnectionFilter
create(FilterableStreamingHttpConnection connection)
Create aStreamingHttpConnectionFilter
using the providedFilterableStreamingHttpConnection
.HttpExecutionStrategy
influenceStrategy(HttpExecutionStrategy strategy)
Optionally modify the passedHttpExecutionStrategy
to a newHttpExecutionStrategy
that 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:StreamingHttpClientFilterFactory
Creates aStreamingHttpClientFilter
using the providedStreamingHttpClientFilter
.- Specified by:
create
in interfaceStreamingHttpClientFilterFactory
- Parameters:
client
-FilterableStreamingHttpClient
to filter- Returns:
StreamingHttpClientFilter
using the providedStreamingHttpClientFilter
.
-
create
public StreamingHttpConnectionFilter create(FilterableStreamingHttpConnection connection)
Description copied from interface:StreamingHttpConnectionFilterFactory
Create aStreamingHttpConnectionFilter
using the providedFilterableStreamingHttpConnection
.- Specified by:
create
in interfaceStreamingHttpConnectionFilterFactory
- Parameters:
connection
-FilterableStreamingHttpConnection
to filter- Returns:
StreamingHttpConnectionFilter
using the providedFilterableStreamingHttpConnection
.
-
influenceStrategy
public HttpExecutionStrategy influenceStrategy(HttpExecutionStrategy strategy)
Description copied from interface:HttpExecutionStrategyInfluencer
Optionally modify the passedHttpExecutionStrategy
to a newHttpExecutionStrategy
that suits thisHttpExecutionStrategyInfluencer
.- Specified by:
influenceStrategy
in interfaceHttpExecutionStrategyInfluencer
- Parameters:
strategy
-HttpExecutionStrategy
to influence.- Returns:
HttpExecutionStrategy
that suits thisHttpExecutionStrategyInfluencer
-
-