public final class MultiDnsServerAddressStreamProvider extends java.lang.Object implements DnsServerAddressStreamProvider
DnsServerAddressStreamProvider
which iterates through a collection of
DnsServerAddressStreamProvider
until the first non-null
result is found.构造器和说明 |
---|
MultiDnsServerAddressStreamProvider(DnsServerAddressStreamProvider... providers)
Create a new instance.
|
MultiDnsServerAddressStreamProvider(java.util.List<DnsServerAddressStreamProvider> providers)
Create a new instance.
|
限定符和类型 | 方法和说明 |
---|---|
DnsServerAddressStream |
nameServerAddressStream(java.lang.String hostname)
Ask this provider for the name servers to query for
hostname . |
public MultiDnsServerAddressStreamProvider(java.util.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(java.lang.String hostname)
DnsServerAddressStreamProvider
hostname
.nameServerAddressStream
在接口中 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
.