| org.xbill.DNS.Resolver
All known Subclasses: org.xbill.DNS.SimpleResolver, org.xbill.DNS.ExtendedResolver,
Resolver | public interface Resolver (Code) | | Interface describing a resolver.
author: Brian Wellington |
Method Summary | |
Message | send(Message query) Sends a message and waits for a response.
Parameters: query - The query to send. | Object | sendAsync(Message query, ResolverListener listener) Asynchronously sends a message registering a listener to receive a callback
on success or exception. | void | setEDNS(int level) Sets the EDNS version used on outgoing messages.
Parameters: level - The EDNS level to use. | void | setEDNS(int level, int payloadSize, int flags, List options) Sets the EDNS information on outgoing messages.
Parameters: level - The EDNS level to use. | void | setIgnoreTruncation(boolean flag) Sets whether truncated responses will be ignored. | void | setPort(int port) | void | setTCP(boolean flag) | void | setTSIGKey(TSIG key) | void | setTimeout(int secs, int msecs) Sets the amount of time to wait for a response before giving up. | void | setTimeout(int secs) Sets the amount of time to wait for a response before giving up. |
send | Message send(Message query) throws IOException(Code) | | Sends a message and waits for a response.
Parameters: query - The query to send. The response throws: IOException - An error occurred while sending or receiving. |
sendAsync | Object sendAsync(Message query, ResolverListener listener)(Code) | | Asynchronously sends a message 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 |
setEDNS | void setEDNS(int level)(Code) | | Sets the EDNS version used on outgoing messages.
Parameters: level - The EDNS level to use. 0 indicates EDNS0 and -1 indicates noEDNS. throws: IllegalArgumentException - An invalid level was indicated. |
setEDNS | void setEDNS(int level, int payloadSize, int flags, List options)(Code) | | Sets the EDNS information on outgoing messages.
Parameters: level - The EDNS level to use. 0 indicates EDNS0 and -1 indicates noEDNS. Parameters: payloadSize - The maximum DNS packet size that this host is capableof receiving over UDP. If 0 is specified, the default (1280) is used. Parameters: flags - EDNS extended flags to be set in the OPT record. Parameters: options - EDNS options to be set in the OPT record, specified as aList of OPTRecord.Option elements. throws: IllegalArgumentException - An invalid field was specified. See Also: OPTRecord |
setIgnoreTruncation | void setIgnoreTruncation(boolean flag)(Code) | | Sets whether truncated responses will be ignored. If not, a truncated
response over UDP will cause a retransmission over TCP.
Parameters: flag - Indicates whether truncated responses should be ignored. |
setPort | void setPort(int port)(Code) | | Sets the port to communicate with on the server
Parameters: port - The port to send messages to |
setTCP | void setTCP(boolean flag)(Code) | | Sets whether TCP connections will be sent by default
Parameters: flag - Indicates whether TCP connections are made |
setTSIGKey | void setTSIGKey(TSIG key)(Code) | | Specifies the TSIG key that messages will be signed with
Parameters: key - The key |
setTimeout | void setTimeout(int secs, int msecs)(Code) | | Sets the amount of time to wait for a response before giving up.
Parameters: secs - The number of seconds to wait. Parameters: msecs - The number of milliseconds to wait. |
setTimeout | void setTimeout(int secs)(Code) | | Sets the amount of time to wait for a response before giving up.
Parameters: secs - The number of seconds to wait. |
|
|