Package io.netty.resolver.dns.macos
Class MacOSDnsServerAddressStreamProvider
- java.lang.Object
-
- io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider
-
- All Implemented Interfaces:
DnsServerAddressStreamProvider
public final class MacOSDnsServerAddressStreamProvider extends java.lang.Object implements DnsServerAddressStreamProvider
DnsServerAddressStreamProviderimplementation 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 voidensureAvailability()static booleanisAvailable()DnsServerAddressStreamnameServerAddressStream(java.lang.String hostname)Ask this provider for the name servers to query forhostname.static java.lang.ThrowableunavailabilityCause()
-
-
-
Method Detail
-
isAvailable
public static boolean isAvailable()
-
ensureAvailability
public static void ensureAvailability()
-
unavailabilityCause
public static java.lang.Throwable unavailabilityCause()
-
nameServerAddressStream
public DnsServerAddressStream nameServerAddressStream(java.lang.String hostname)
Description copied from interface:DnsServerAddressStreamProviderAsk this provider for the name servers to query forhostname.- Specified by:
nameServerAddressStreamin interfaceDnsServerAddressStreamProvider- Parameters:
hostname- The hostname for which to lookup the DNS server addressed to use. If this is the finalDnsServerAddressStreamProviderto be queried then generally empty string or'.'correspond to the defaultDnsServerAddressStream.- Returns:
- The
DnsServerAddressStreamwhich should be used to resolvehostname.
-
-