public final class MacOSDnsServerAddressStreamProvider extends java.lang.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.构造器和说明 |
---|
MacOSDnsServerAddressStreamProvider() |
限定符和类型 | 方法和说明 |
---|---|
static void |
ensureAvailability() |
static boolean |
isAvailable() |
DnsServerAddressStream |
nameServerAddressStream(java.lang.String hostname)
Ask this provider for the name servers to query for
hostname . |
static java.lang.Throwable |
unavailabilityCause() |
public static boolean isAvailable()
public static void ensureAvailability()
public static java.lang.Throwable unavailabilityCause()
public DnsServerAddressStream nameServerAddressStream(java.lang.String hostname)
DnsServerAddressStreamProvider
hostname
.nameServerAddressStream
在接口中 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
.