|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface describing a resolver.
| Method Summary | |
Message |
send(Message query)
Sends a message and waits for a response. |
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. |
void |
setIgnoreTruncation(boolean flag)
Sets whether truncated responses will be ignored. |
void |
setPort(int port)
Sets the port to communicate with on the server |
void |
setTCP(boolean flag)
Sets whether TCP connections will be sent by default |
void |
setTimeout(int secs)
Sets the amount of time to wait for a response before giving up. |
void |
setTSIGKey(Name name,
byte[] key)
Specifies the TSIG key that messages will be signed with |
void |
setTSIGKey(String key)
Specifies the TSIG key (with the same name as the local host) that messages will be signed with. |
void |
setTSIGKey(String name,
String key)
Specifies the TSIG key that messages will be signed with |
void |
setTSIGKey(TSIG key)
Specifies the TSIG key that messages will be signed with |
| Method Detail |
public void setPort(int port)
port - The port to send messages topublic void setTCP(boolean flag)
flag - Indicates whether TCP connections are madepublic void setIgnoreTruncation(boolean flag)
flag - Indicates whether truncated responses should be ignored.public void setEDNS(int level)
level - The EDNS level to use. 0 indicates EDNS0 and -1 indicates no
EDNS.
UnsupportedOperationException - An invalid level was indicatedpublic void setTSIGKey(TSIG key)
key - The key
public void setTSIGKey(Name name,
byte[] key)
name - The key namekey - The key data
public void setTSIGKey(String name,
String key)
name - The key namekey - The key data, represented as either a base64 encoded string
or (if the first character is ':') a hex encoded string
IllegalArgumentException - The key name is an invalid name
IllegalArgumentException - The key data is improperly encoded
public void setTSIGKey(String key)
throws UnknownHostException
key - The key data, represented as either a base64 encoded string
or (if the first character is ':') a hex encoded string
IllegalArgumentException - The key data is improperly encoded
UnknownHostException - The local host name could not be determinedpublic void setTimeout(int secs)
secs - The number of seconds to wait.
public Message send(Message query)
throws IOException
query - The query to send.
IOException - An error occurred while sending or receiving.
public Object sendAsync(Message query,
ResolverListener listener)
query - The query to sendlistener - The object containing the callbacks.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||