Class DnsTextEndpointGroup
- java.lang.Object
-
- com.linecorp.armeria.common.util.AbstractListenable<List<Endpoint>>
-
- com.linecorp.armeria.client.endpoint.DynamicEndpointGroup
-
- com.linecorp.armeria.client.endpoint.dns.DnsTextEndpointGroup
-
- All Implemented Interfaces:
EndpointGroup
,Listenable<List<Endpoint>>
,SafeCloseable
,AutoCloseable
public final class DnsTextEndpointGroup extends DynamicEndpointGroup
DynamicEndpointGroup
which resolves targets using DNSTXT
records. This is useful for environments where service discovery is handled using DNS.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Stops polling DNS servers for service updates.static DnsTextEndpointGroup
of(String hostname, Function<byte[],Endpoint> mapping)
Creates aDnsTextEndpointGroup
that schedules queries on a randomEventLoop
fromCommonPools.workerGroup()
.-
Methods inherited from class com.linecorp.armeria.client.endpoint.DynamicEndpointGroup
addEndpoint, endpoints, initialEndpointsFuture, removeEndpoint, setEndpoints
-
Methods inherited from class com.linecorp.armeria.common.util.AbstractListenable
addListener, notifyListeners, removeListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.linecorp.armeria.client.endpoint.EndpointGroup
addListener, awaitInitialEndpoints, awaitInitialEndpoints, orElse, removeListener
-
-
-
-
Method Detail
-
of
public static DnsTextEndpointGroup of(String hostname, Function<byte[],Endpoint> mapping)
Creates aDnsTextEndpointGroup
that schedules queries on a randomEventLoop
fromCommonPools.workerGroup()
.
-
close
public final void close()
Stops polling DNS servers for service updates.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceEndpointGroup
- Specified by:
close
in interfaceSafeCloseable
- Overrides:
close
in classDynamicEndpointGroup
-
-