Interface EndpointGroup
-
- All Superinterfaces:
AutoCloseable
,Listenable<List<Endpoint>>
,SafeCloseable
- All Known Implementing Classes:
DnsAddressEndpointGroup
,DnsServiceEndpointGroup
,DnsTextEndpointGroup
,DynamicEndpointGroup
,HealthCheckedEndpointGroup
,HttpHealthCheckedEndpointGroup
,PropertiesEndpointGroup
,StaticEndpointGroup
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface EndpointGroup extends Listenable<List<Endpoint>>, SafeCloseable
A list ofEndpoint
s.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
addListener(Consumer<? super List<Endpoint>> listener)
Adds aConsumer
that will be invoked when aListenable
changes its value.default void
close()
List<Endpoint>
endpoints()
Return the endpoints held by thisEndpointGroup
.default EndpointGroup
orElse(EndpointGroup nextEndpointGroup)
default void
removeListener(Consumer<?> listener)
Remove a listener.
-
-
-
Method Detail
-
endpoints
List<Endpoint> endpoints()
Return the endpoints held by thisEndpointGroup
.
-
addListener
default void addListener(Consumer<? super List<Endpoint>> listener)
Description copied from interface:Listenable
Adds aConsumer
that will be invoked when aListenable
changes its value.- Specified by:
addListener
in interfaceListenable<List<Endpoint>>
-
removeListener
default void removeListener(Consumer<?> listener)
Description copied from interface:Listenable
Remove a listener.- Specified by:
removeListener
in interfaceListenable<List<Endpoint>>
-
close
default void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceSafeCloseable
-
orElse
default EndpointGroup orElse(EndpointGroup nextEndpointGroup)
-
-