public final class SequentialDnsServerAddressStreamProvider
extends java.lang.Object
DnsServerAddressStreamProvider
which is backed by a sequential list of DNS servers.构造器和说明 |
---|
SequentialDnsServerAddressStreamProvider(java.net.InetSocketAddress... addresses)
Create a new instance.
|
SequentialDnsServerAddressStreamProvider(java.lang.Iterable<? extends java.net.InetSocketAddress> addresses)
Create a new instance.
|
限定符和类型 | 方法和说明 |
---|---|
DnsServerAddressStream |
nameServerAddressStream(java.lang.String hostname)
Ask this provider for the name servers to query for
hostname . |
public SequentialDnsServerAddressStreamProvider(java.net.InetSocketAddress... addresses)
addresses
- The addresses which will be returned in sequential order via
nameServerAddressStream(String)
public SequentialDnsServerAddressStreamProvider(java.lang.Iterable<? extends java.net.InetSocketAddress> addresses)
addresses
- The addresses which will be returned in sequential order via
nameServerAddressStream(String)
public final 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
.