@UnstableApi public final class MultiDnsServerAddressStreamProvider extends Object implements DnsServerAddressStreamProvider
DnsServerAddressStreamProvider
which iterates through a collection of
DnsServerAddressStreamProvider
until the first non-null
result is found.Constructor and Description |
---|
MultiDnsServerAddressStreamProvider(DnsServerAddressStreamProvider... providers)
Create a new instance.
|
MultiDnsServerAddressStreamProvider(List<DnsServerAddressStreamProvider> providers)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
DnsServerAddressStream |
nameServerAddressStream(String hostname)
Ask this provider for the name servers to query for
hostname . |
public MultiDnsServerAddressStreamProvider(List<DnsServerAddressStreamProvider> providers)
providers
- The providers to use for DNS resolution. They will be queried in order.public MultiDnsServerAddressStreamProvider(DnsServerAddressStreamProvider... providers)
providers
- The providers to use for DNS resolution. They will be queried in order.public DnsServerAddressStream nameServerAddressStream(String hostname)
DnsServerAddressStreamProvider
hostname
.nameServerAddressStream
in interface DnsServerAddressStreamProvider
hostname
- The hostname for which to lookup the DNS server addressed to use.
If this is the final DnsServerAddressStreamProvider
to be queried then generally empty
string or '.'
correspond to the default DnsServerAddressStream
.DnsServerAddressStream
which should be used to resolve hostname
.Copyright © 2008–2017 The Netty Project. All rights reserved.