public final class SingletonDnsServerAddressStreamProvider extends java.lang.Object implements DnsServerAddressStreamProvider
DnsServerAddressStreamProvider
which always returns the same DnsServerAddressStream
.Constructor and Description |
---|
SingletonDnsServerAddressStreamProvider(DnsServerAddressStream stream)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
DnsServerAddressStream |
nameServerAddressStream(java.lang.String hostname)
Ask this provider for the name servers to query for
hostname . |
public SingletonDnsServerAddressStreamProvider(DnsServerAddressStream stream)
stream
- The singelton to return from nameServerAddressStream(String)
.public DnsServerAddressStream nameServerAddressStream(java.lang.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
.