UnresolvedAddress - The type of address before resolution.ResolvedAddress - The type of address after resolution.Event - Type of ServiceDiscovererEvents published from ServiceDiscoverer.discover(Object).@FunctionalInterface
public interface ServiceDiscovererFilterFactory<UnresolvedAddress,ResolvedAddress,Event extends ServiceDiscovererEvent<ResolvedAddress>>
ServiceDiscovererFilter.| Modifier and Type | Method and Description |
|---|---|
default ServiceDiscovererFilterFactory<UnresolvedAddress,ResolvedAddress,Event> |
append(ServiceDiscovererFilterFactory<UnresolvedAddress,ResolvedAddress,Event> before)
Returns a composed function that first applies the
before function to its input, and then applies
this function to the result. |
ServiceDiscovererFilter<UnresolvedAddress,ResolvedAddress,Event> |
create(ServiceDiscoverer<UnresolvedAddress,ResolvedAddress,Event> serviceDiscoverer)
Create a
ServiceDiscovererFilter using the provided ServiceDiscoverer. |
static <UnresolvedAddress,ResolvedAddress,E extends ServiceDiscovererEvent<ResolvedAddress>> |
identity()
Returns a function that always returns its input
ServiceDiscoverer. |
ServiceDiscovererFilter<UnresolvedAddress,ResolvedAddress,Event> create(ServiceDiscoverer<UnresolvedAddress,ResolvedAddress,Event> serviceDiscoverer)
ServiceDiscovererFilter using the provided ServiceDiscoverer.serviceDiscoverer - ServiceDiscoverer to filterServiceDiscovererFilter using the provided ServiceDiscoverer.default ServiceDiscovererFilterFactory<UnresolvedAddress,ResolvedAddress,Event> append(ServiceDiscovererFilterFactory<UnresolvedAddress,ResolvedAddress,Event> 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 service discoverer wrapped by this filter chain the order of invocation of these filters
will be:
filter1 => filter2 => filter3 => service discoverer
before - the function to apply before this function is appliedbefore
function and then applies this functionstatic <UnresolvedAddress,ResolvedAddress,E extends ServiceDiscovererEvent<ResolvedAddress>> ServiceDiscovererFilterFactory<UnresolvedAddress,ResolvedAddress,E> identity()
ServiceDiscoverer.UnresolvedAddress - The type of address before resolution.ResolvedAddress - The type of address after resolution.E - Type of ServiceDiscovererEvents published from ServiceDiscoverer.discover(Object).ServiceDiscoverer.