| java.lang.Object org.apache.harmony.jndi.provider.dns.SList
SList | class SList (Code) | | Represents DNS resolver's SLIST - the structure to keep the collected
information about active DNS servers and zones they contain information
about.
See Also: RFC See Also: 1034 TODO some methods can be optimized |
Inner Class :static class Entry | |
Inner Class :static class Server | |
Method Summary | |
void | clear() Clears the SLIST. | void | dropServer(String zone, Server server) Removes occurrence of given server related to given zone from the SLIST. | Server | getBestGuess(String zone, Hashtable<Server, ?> serversToIgnore) Returns the best guess about that DNS server should be chosen to send the
request concerning the particular DNS zone. | static SList | getInstance() SList is a singleton class. | Server | getServerByIP(String zone, String ip, int port) | Server | getServerByName(String zone, String name, int port) | Server | getServerByServer(String zone, Server server) | Enumeration<Server> | getServersByName(String name) | boolean | hasServer(String zone, Server server) | boolean | hasServer(String hostname) Checks if given server is present in the internal list of known servers. | void | setServerIP(String hostname, String newIP) Add IP information of server in list. | void | updateEntry(String zone, Server server, int responseTime) Updates existent SLIST entry or creates a new one. |
NETWORK_FAILURE | public static int NETWORK_FAILURE(Code) | | |
SERVER_FAILURE | public static int SERVER_FAILURE(Code) | | |
TIMEOUT | public static int TIMEOUT(Code) | | |
UNKNOWN | public static int UNKNOWN(Code) | | |
clear | void clear()(Code) | | Clears the SLIST.
|
dropServer | void dropServer(String zone, Server server)(Code) | | Removes occurrence of given server related to given zone from the SLIST.
Parameters: zone - DNS zone Parameters: server - the server to remove |
getBestGuess | Server getBestGuess(String zone, Hashtable<Server, ?> serversToIgnore)(Code) | | Returns the best guess about that DNS server should be chosen to send the
request concerning the particular DNS zone.
Parameters: zone - the name of DNS zone best guess - a SList.Server object;null if the information is not found |
getInstance | static SList getInstance()(Code) | | SList is a singleton class.
instance of SList |
getServerByIP | Server getServerByIP(String zone, String ip, int port)(Code) | | Parameters: zone - name of DNS zone Parameters: srvIP - IPv4 address of server Parameters: srvPort - port on server Server object with specified attributes |
getServerByName | Server getServerByName(String zone, String name, int port)(Code) | | Parameters: zone - the name DNS zone Parameters: srvName - the name of the server Parameters: srvPort - the port of the server Server object with specified attributes |
getServerByServer | Server getServerByServer(String zone, Server server)(Code) | | Parameters: zone - the name of DNS zone to query SLIST with Parameters: server - the server to compare with first Server object from SLIST that equals tospecified server in terms of equals() method;null if not found. See Also: SList.Server.equals(SList.Server) |
getServersByName | Enumeration<Server> getServersByName(String name)(Code) | | Returns all occurrences of server with specified
Parameters: name - hostname found server object or null if not found |
hasServer | boolean hasServer(String zone, Server server)(Code) | | Parameters: zone - the name of zone Parameters: server - DNS server true if SList has information about specifiedserver & zone combination; false otherwise |
hasServer | boolean hasServer(String hostname)(Code) | | Checks if given server is present in the internal list of known servers.
Parameters: hostname - host name of server true or false |
setServerIP | void setServerIP(String hostname, String newIP)(Code) | | Add IP information of server in list. Affects only servers with IP set to
null .
Parameters: hostname - hostname of server Parameters: newIP - new IP |
updateEntry | void updateEntry(String zone, Server server, int responseTime)(Code) | | Updates existent SLIST entry or creates a new one. S-List will be sorted
according the response time. Entries with bigger response will be placed
father from the beginning of the list.
Parameters: zone - the name of DNS zone Parameters: server - the server that is known to have the information about givenzone Parameters: responseTime - response time for server for this particular DNS zone |
|
|