Module io.netty5.resolver.dns
Package io.netty5.resolver.dns
Class SingletonDnsServerAddressStreamProvider
- java.lang.Object
-
- io.netty5.resolver.dns.SingletonDnsServerAddressStreamProvider
-
- All Implemented Interfaces:
DnsServerAddressStreamProvider
public final class SingletonDnsServerAddressStreamProvider extends Object
ADnsServerAddressStreamProvider
which always uses a single DNS server for resolution.
-
-
Constructor Summary
Constructors Constructor Description SingletonDnsServerAddressStreamProvider(InetSocketAddress address)
Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DnsServerAddressStream
nameServerAddressStream(String hostname)
Ask this provider for the name servers to query forhostname
.
-
-
-
Constructor Detail
-
SingletonDnsServerAddressStreamProvider
public SingletonDnsServerAddressStreamProvider(InetSocketAddress address)
Create a new instance.- Parameters:
address
- The singleton address to use for every DNS resolution.
-
-
Method Detail
-
nameServerAddressStream
public final DnsServerAddressStream nameServerAddressStream(String hostname)
Description copied from interface:DnsServerAddressStreamProvider
Ask this provider for the name servers to query forhostname
.- Specified by:
nameServerAddressStream
in interfaceDnsServerAddressStreamProvider
- Parameters:
hostname
- The hostname for which to lookup the DNS server addressed to use. If this is the finalDnsServerAddressStreamProvider
to be queried then generally empty string or'.'
correspond to the defaultDnsServerAddressStream
.- Returns:
- The
DnsServerAddressStream
which should be used to resolvehostname
.
-
-