| java.lang.Object org.xbill.DNS.SimpleResolver
SimpleResolver | public class SimpleResolver implements Resolver(Code) | | An implementation of Resolver that sends one query to one server.
SimpleResolver handles TCP retries, transaction security (TSIG), and
EDNS 0.
See Also: Resolver See Also: TSIG See Also: OPTRecord author: Brian Wellington |
DEFAULT_EDNS_PAYLOADSIZE | final public static int DEFAULT_EDNS_PAYLOADSIZE(Code) | | The default EDNS payload size
|
DEFAULT_PORT | final public static int DEFAULT_PORT(Code) | | The default port to send queries to
|
getTimeout | long getTimeout()(Code) | | |
send | public Message send(Message query) throws IOException(Code) | | Sends a message to a single server and waits for a response. No checking
is done to ensure that the response is associated with the query.
Parameters: query - The query to send. The response. throws: IOException - An error occurred while sending or receiving. |
sendAsync | public Object sendAsync(Message query, ResolverListener listener)(Code) | | Asynchronously sends a message to a single server, registering a listener
to receive a callback on success or exception. Multiple asynchronous
lookups can be performed in parallel. Since the callback may be invoked
before the function returns, external synchronization is necessary.
Parameters: query - The query to send Parameters: listener - The object containing the callbacks. An identifier, which is also a parameter in the callback |
setAddress | public void setAddress(InetSocketAddress addr)(Code) | | Sets the address of the server to communicate with.
Parameters: addr - The address of the DNS server |
setAddress | public void setAddress(InetAddress addr)(Code) | | Sets the address of the server to communicate with (on the default
DNS port)
Parameters: addr - The address of the DNS server |
setDefaultResolver | public static void setDefaultResolver(String hostname)(Code) | | Sets the default host (initially localhost) to query
|
setEDNS | public void setEDNS(int level, int payloadSize, int flags, List options)(Code) | | |
setEDNS | public void setEDNS(int level)(Code) | | |
setIgnoreTruncation | public void setIgnoreTruncation(boolean flag)(Code) | | |
setLocalAddress | public void setLocalAddress(InetSocketAddress addr)(Code) | | Sets the local address to bind to when sending messages.
Parameters: addr - The local address to send messages from. |
setLocalAddress | public void setLocalAddress(InetAddress addr)(Code) | | Sets the local address to bind to when sending messages. A random port
will be used.
Parameters: addr - The local address to send messages from. |
setPort | public void setPort(int port)(Code) | | |
setTCP | public void setTCP(boolean flag)(Code) | | |
setTimeout | public void setTimeout(int secs, int msecs)(Code) | | |
setTimeout | public void setTimeout(int secs)(Code) | | |
|
|