Class SingletonDnsServerAddressStreamProvider
- java.lang.Object
-
- io.servicetalk.dns.discovery.netty.SingletonDnsServerAddressStreamProvider
-
- All Implemented Interfaces:
DnsServerAddressStreamProvider
public final class SingletonDnsServerAddressStreamProvider extends java.lang.Object implements DnsServerAddressStreamProvider
ADnsServerAddressStreamProvider
which always returns the sameDnsServerAddressStream
.
-
-
Constructor Summary
Constructors Constructor Description SingletonDnsServerAddressStreamProvider(java.net.InetSocketAddress address)
Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DnsServerAddressStream
nameServerAddressStream(java.lang.String hostname)
Ask this provider for the name servers to query forhostname
.
-
-
-
Constructor Detail
-
SingletonDnsServerAddressStreamProvider
public SingletonDnsServerAddressStreamProvider(java.net.InetSocketAddress address)
Create a new instance.- Parameters:
address
- The address to return fromnameServerAddressStream(String)
.
-
-
Method Detail
-
nameServerAddressStream
public DnsServerAddressStream nameServerAddressStream(java.lang.String hostname)
Description copied from interface:DnsServerAddressStreamProvider
Ask this provider for the name servers to query forhostname
.- Specified by:
nameServerAddressStream
in interfaceDnsServerAddressStreamProvider
- Parameters:
hostname
- The hostname for which to lookup the DNS server addressed to use. If this is the finalDnsServerAddressStreamProvider
to be queried then generally empty string or'.'
correspond to the defaultDnsServerAddressStream
.- Returns:
- The
DnsServerAddressStream
which should be used to resolvehostname
.
-
-