@UnstableApi public final class SingletonDnsServerAddressStreamProvider extends Object implements DnsServerAddressStreamProvider
DnsServerAddressStreamProvider
which always uses a single DNS server for resolution.Constructor and Description |
---|
SingletonDnsServerAddressStreamProvider(InetSocketAddress address)
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 SingletonDnsServerAddressStreamProvider(InetSocketAddress address)
address
- The singleton address to use for every DNS resolution.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.