Package io.servicetalk.http.api
Class FilterFactoryUtils
- java.lang.Object
-
- io.servicetalk.http.api.FilterFactoryUtils
-
public final class FilterFactoryUtils extends java.lang.Object
Utilities for filter factories.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StreamingHttpClientFilterFactory
appendClientFilterFactory(StreamingHttpClientFilterFactory first, StreamingHttpClientFilterFactory second)
Returns a composed function of two sequentialclient filter factories
.static StreamingHttpConnectionFilterFactory
appendConnectionFilterFactory(StreamingHttpConnectionFilterFactory first, StreamingHttpConnectionFilterFactory second)
Returns a composed function of two sequentialconnection filter factories
.static StreamingHttpServiceFilterFactory
appendServiceFilterFactory(StreamingHttpServiceFilterFactory first, StreamingHttpServiceFilterFactory second)
Returns a composed function of two sequentialservice filter factories
.
-
-
-
Method Detail
-
appendClientFilterFactory
public static StreamingHttpClientFilterFactory appendClientFilterFactory(StreamingHttpClientFilterFactory first, StreamingHttpClientFilterFactory second)
Returns a composed function of two sequentialclient filter factories
.The order of execution of these filters are in order of append. If 2 filters are appended as follows:
StreamingHttpClientFilterFactory result = appendClientFilterFactory(filter1, filter2);
making a request to a client wrapped by this filter chain the order of invocation of these filters will be:filter1 ⇒ filter2 ⇒ client
- Parameters:
first
- the factory for the first filter in execution chainsecond
- the factory for the second filter in execution chain- Returns:
- a composed function of two sequential filters
-
appendConnectionFilterFactory
public static StreamingHttpConnectionFilterFactory appendConnectionFilterFactory(StreamingHttpConnectionFilterFactory first, StreamingHttpConnectionFilterFactory second)
Returns a composed function of two sequentialconnection filter factories
.The order of execution of these filters are in order of append. If 2 filters are appended as follows:
StreamingHttpConnectionFilterFactory result = appendConnectionFilterFactory(filter1, filter2);
making a request to a connection wrapped by this filter chain the order of invocation of these filters will be:filter1 ⇒ filter2 ⇒ connection
- Parameters:
first
- the factory for the first filter in execution chainsecond
- the factory for the second filter in execution chain- Returns:
- a composed function of two sequential filters
-
appendServiceFilterFactory
public static StreamingHttpServiceFilterFactory appendServiceFilterFactory(StreamingHttpServiceFilterFactory first, StreamingHttpServiceFilterFactory second)
Returns a composed function of two sequentialservice filter factories
.The order of execution of these filters are in order of append. If 2 filters are appended as follows:
StreamingHttpServiceFilterFactory result = appendServiceFilterFactory(filter1, filter2);
accepting a request by a service wrapped by this filter chain, the order of invocation of these filters will be: be:filter1 ⇒ filter2 ⇒ service
- Parameters:
first
- the factory for the first filter in execution chainsecond
- the factory for the second filter in execution chain- Returns:
- a composed function of two sequential filters
-
-