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 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.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Map<String, DnsServerAddresses> private final AtomicLongprivate static final InternalLoggerprivate static final longprivate static final Comparator<DnsResolver> private static final Throwable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic booleanprivate static voidnameServerAddressStream(String hostname) Ask this provider for the name servers to query forhostname.private static DnsResolver[]private static Map<String, DnsServerAddresses> static Throwable
-
Field Details
-
RESOLVER_COMPARATOR
-
UNAVAILABILITY_CAUSE
-
logger
-
REFRESH_INTERVAL
private static final long REFRESH_INTERVAL -
currentMappings
-
lastRefresh
-
-
Constructor Details
-
MacOSDnsServerAddressStreamProvider
public MacOSDnsServerAddressStreamProvider()
-
-
Method Details
-
loadNativeLibrary
private static void loadNativeLibrary() -
isAvailable
public static boolean isAvailable() -
ensureAvailability
public static void ensureAvailability() -
retrieveCurrentMappings
-
nameServerAddressStream
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.
-
resolvers
-