|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Resolver
Interface describing a resolver.
Method Summary | |
---|---|
Message |
send(Message query)
Sends a message and waits for a response. |
java.lang.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 |
setEDNS(int level,
int payloadSize,
int flags,
java.util.List options)
Sets the EDNS information 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)
Deprecated. Use setTSIGKey(TSIG) |
void |
setTSIGKey(java.lang.String name,
java.lang.String key)
Deprecated. Use setTSIGKey(TSIG) |
void |
setTSIGKey(TSIG key)
Specifies the TSIG key that messages will be signed with |
Method Detail |
---|
void setPort(int port)
port
- The port to send messages tovoid setTCP(boolean flag)
flag
- Indicates whether TCP connections are madevoid setIgnoreTruncation(boolean flag)
flag
- Indicates whether truncated responses should be ignored.void setEDNS(int level)
level
- The EDNS level to use. 0 indicates EDNS0 and -1 indicates no
EDNS.
java.lang.IllegalArgumentException
- An invalid level was indicated.void setEDNS(int level, int payloadSize, int flags, java.util.List options)
level
- The EDNS level to use. 0 indicates EDNS0 and -1 indicates no
EDNS.payloadSize
- The maximum DNS packet size that this host is capable
of receiving over UDP. If 0 is specified, the default (1280) is used.flags
- EDNS extended flags to be set in the OPT record.options
- EDNS options to be set in the OPT record, specified as a
List of OPTRecord.Option elements.
java.lang.IllegalArgumentException
- An invalid field was specified.OPTRecord
void setTSIGKey(TSIG key)
key
- The keyvoid setTSIGKey(Name name, byte[] key)
name
- The key namekey
- The key datavoid setTSIGKey(java.lang.String name, java.lang.String key)
name
- The key namekey
- The key data, represented as a base64 encoded string.
java.lang.IllegalArgumentException
- The key name is an invalid name
java.lang.IllegalArgumentException
- The key data is improperly encodedvoid setTimeout(int secs)
secs
- The number of seconds to wait.Message send(Message query) throws java.io.IOException
query
- The query to send.
java.io.IOException
- An error occurred while sending or receiving.java.lang.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 |