Module io.netty5.resolver.dns
Package io.netty5.resolver.dns
Class MultiDnsServerAddressStreamProvider
- java.lang.Object
-
- io.netty5.resolver.dns.MultiDnsServerAddressStreamProvider
-
- All Implemented Interfaces:
DnsServerAddressStreamProvider
public final class MultiDnsServerAddressStreamProvider extends Object implements DnsServerAddressStreamProvider
ADnsServerAddressStreamProvider
which iterates through a collection ofDnsServerAddressStreamProvider
until the first non-null
result is found.
-
-
Constructor Summary
Constructors Constructor Description MultiDnsServerAddressStreamProvider(DnsServerAddressStreamProvider... providers)
Create a new instance.MultiDnsServerAddressStreamProvider(List<DnsServerAddressStreamProvider> providers)
Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DnsServerAddressStream
nameServerAddressStream(String hostname)
Ask this provider for the name servers to query forhostname
.
-
-
-
Constructor Detail
-
MultiDnsServerAddressStreamProvider
public MultiDnsServerAddressStreamProvider(List<DnsServerAddressStreamProvider> providers)
Create a new instance.- Parameters:
providers
- The providers to use for DNS resolution. They will be queried in order.
-
MultiDnsServerAddressStreamProvider
public MultiDnsServerAddressStreamProvider(DnsServerAddressStreamProvider... providers)
Create a new instance.- Parameters:
providers
- The providers to use for DNS resolution. They will be queried in order.
-
-
Method Detail
-
nameServerAddressStream
public DnsServerAddressStream nameServerAddressStream(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
.
-
-