Package org.minidns.dnsserverlookup
Class AbstractDnsServerLookupMechanism
- java.lang.Object
-
- org.minidns.dnsserverlookup.AbstractDnsServerLookupMechanism
-
- All Implemented Interfaces:
Comparable<DnsServerLookupMechanism>,DnsServerLookupMechanism
- Direct Known Subclasses:
AndroidUsingExec,AndroidUsingLinkProperties,AndroidUsingReflection,UnixUsingEtcResolvConf
public abstract class AbstractDnsServerLookupMechanism extends Object implements DnsServerLookupMechanism
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractDnsServerLookupMechanism(String name, int priority)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intcompareTo(DnsServerLookupMechanism other)abstract List<String>getDnsServerAddresses()Returns a List of String representing ideally IP addresses.StringgetName()intgetPriority()protected static List<String>toListOfStrings(Collection<? extends 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
-
-
-
-
Constructor Detail
-
AbstractDnsServerLookupMechanism
protected AbstractDnsServerLookupMechanism(String name, int priority)
-
-
Method Detail
-
getName
public final String getName()
- Specified by:
getNamein interfaceDnsServerLookupMechanism
-
getPriority
public final int getPriority()
- Specified by:
getPriorityin interfaceDnsServerLookupMechanism
-
compareTo
public final int compareTo(DnsServerLookupMechanism other)
- Specified by:
compareToin interfaceComparable<DnsServerLookupMechanism>
-
getDnsServerAddresses
public abstract List<String> getDnsServerAddresses()
Description copied from interface:DnsServerLookupMechanismReturns 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:
getDnsServerAddressesin interfaceDnsServerLookupMechanism- Returns:
- a List of Strings presenting hopefully IP addresses.
-
toListOfStrings
protected static List<String> toListOfStrings(Collection<? extends InetAddress> inetAddresses)
-
-