U
- the type of address before resolution (unresolved address).@FunctionalInterface
public interface MultiAddressHttpClientFilterFactory<U>
StreamingHttpClientFilter
to filter clients for different unresolved addresses.StreamingHttpClientFilterFactory
StreamingHttpClientFilter create(U address, FilterableStreamingHttpClient client)
StreamingHttpClientFilter
for the passed address
using the provided
FilterableStreamingHttpClient
.address
- the UnresolvedAddress
for the FilterableStreamingHttpClient
client
- the FilterableStreamingHttpClient
to filterFilterableStreamingHttpClient
default MultiAddressHttpClientFilterFactory<U> append(MultiAddressHttpClientFilterFactory<U> before)
before
function to its input, and then applies
this function to the result.
The order of execution of these filters are in order of append. If 3 filters are added as follows:
filter1.append(filter2).append(filter3)Making a request to a client wrapped by this filter chain the order of invocation of these filters will be:
filter1 => filter2 => filter3 => client
before
- the function to apply before this function is appliedbefore
function and then applies this functiondefault StreamingHttpClientFilterFactory asClientFilter(U address)
StreamingHttpClientFilterFactory
that adapts from a
MultiAddressHttpClientFilterFactory
.address
- will be passed in all StreamingHttpClientFilterFactory
applicationsStreamingHttpClientFilterFactory
function with a provided GroupKey
static <U> MultiAddressHttpClientFilterFactory<U> from(java.util.function.BiFunction<U,FilterableStreamingHttpClient,StreamingHttpClientFilter> function)
UnaryOperator
<FilterableStreamingHttpClient
>
function type to the MultiAddressHttpClientFilterFactory
.U
- the type of address before resolution (unresolved address)function
- the function that is applied to the input GroupKey
and
FilterableStreamingHttpClient
MultiAddressHttpClientFilterFactory
static <U> MultiAddressHttpClientFilterFactory<U> from(java.util.function.Function<FilterableStreamingHttpClient,StreamingHttpClientFilter> function)
Function
<FilterableStreamingHttpClient
,
StreamingHttpClientFilter
> to the StreamingHttpClientFilterFactory
.U
- the type of address before resolution (unresolved address)function
- the function that is applied to the original FilterableStreamingHttpClient
StreamingHttpClientFilterFactory
that uses the passed filter Function
.