public final class SingletonDnsServerAddressStreamProvider
extends java.lang.Object
DnsServerAddressStreamProvider
which always uses a single DNS server for resolution.构造器和说明 |
---|
SingletonDnsServerAddressStreamProvider(java.net.InetSocketAddress address)
Create a new instance.
|
限定符和类型 | 方法和说明 |
---|---|
DnsServerAddressStream |
nameServerAddressStream(java.lang.String hostname)
Ask this provider for the name servers to query for
hostname . |
public SingletonDnsServerAddressStreamProvider(java.net.InetSocketAddress address)
address
- The singleton address to use for every DNS resolution.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
.