Package io.netty5.resolver.dns.macos
Class MacOSDnsServerAddressStreamProvider
- java.lang.Object
-
- io.netty5.resolver.dns.macos.MacOSDnsServerAddressStreamProvider
-
- All Implemented Interfaces:
DnsServerAddressStreamProvider
public final class MacOSDnsServerAddressStreamProvider extends Object implements DnsServerAddressStreamProvider
DnsServerAddressStreamProvider
implementation which makes use of the same mechanism as Apple's open source mDNSResponder to retrieve the current nameserver configuration of the system.
-
-
Constructor Summary
Constructors Constructor Description MacOSDnsServerAddressStreamProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
ensureAvailability()
static boolean
isAvailable()
DnsServerAddressStream
nameServerAddressStream(String hostname)
Ask this provider for the name servers to query forhostname
.static Throwable
unavailabilityCause()
-
-
-
Method Detail
-
isAvailable
public static boolean isAvailable()
-
ensureAvailability
public static void ensureAvailability()
-
unavailabilityCause
public static Throwable unavailabilityCause()
-
nameServerAddressStream
public 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
.
-
-