Package org.minidns.dnsserverlookup
Class AbstractDnsServerLookupMechanism
- java.lang.Object
-
- org.minidns.dnsserverlookup.AbstractDnsServerLookupMechanism
-
- All Implemented Interfaces:
java.lang.Comparable<DnsServerLookupMechanism>
,DnsServerLookupMechanism
- Direct Known Subclasses:
AndroidUsingExec
,AndroidUsingLinkProperties
,AndroidUsingReflection
,UnixUsingEtcResolvConf
public abstract class AbstractDnsServerLookupMechanism extends java.lang.Object implements DnsServerLookupMechanism
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.util.logging.Logger
LOGGER
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractDnsServerLookupMechanism(java.lang.String name, int priority)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
compareTo(DnsServerLookupMechanism other)
abstract java.util.List<java.lang.String>
getDnsServerAddresses()
Returns a List of String representing ideally IP addresses.java.lang.String
getName()
int
getPriority()
protected static java.util.List<java.lang.String>
toListOfStrings(java.util.Collection<? extends java.net.InetAddress> inetAddresses)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.minidns.dnsserverlookup.DnsServerLookupMechanism
isAvailable
-
-
-
-
Field Detail
-
LOGGER
protected static final java.util.logging.Logger LOGGER
-
-
Constructor Detail
-
AbstractDnsServerLookupMechanism
protected AbstractDnsServerLookupMechanism(java.lang.String name, int priority)
-
-
Method Detail
-
getName
public final java.lang.String getName()
- Specified by:
getName
in interfaceDnsServerLookupMechanism
-
getPriority
public final int getPriority()
- Specified by:
getPriority
in interfaceDnsServerLookupMechanism
-
compareTo
public final int compareTo(DnsServerLookupMechanism other)
- Specified by:
compareTo
in interfacejava.lang.Comparable<DnsServerLookupMechanism>
-
getDnsServerAddresses
public abstract java.util.List<java.lang.String> getDnsServerAddresses()
Description copied from interface:DnsServerLookupMechanism
Returns a List of String representing ideally IP addresses. The list must be modifiable.Note that the lookup mechanisms are not required to assure that only IP addresses are returned. This verification is performed in when using
DnsClient.findDNS()
.- Specified by:
getDnsServerAddresses
in interfaceDnsServerLookupMechanism
- Returns:
- a List of Strings presenting hopefully IP addresses.
-
toListOfStrings
protected static java.util.List<java.lang.String> toListOfStrings(java.util.Collection<? extends java.net.InetAddress> inetAddresses)
-
-