|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xbill.DNS.ExtendedResolver
An implementation of Resolver that can send queries to multiple servers, sending the queries multiple times if necessary.
Resolver| Constructor Summary | |
ExtendedResolver()
Creates a new Extended Resolver. |
|
ExtendedResolver(Resolver[] res)
Creates a new Extended Resolver |
|
ExtendedResolver(String[] servers)
Creates a new Extended Resolver |
|
| Method Summary | |
void |
addResolver(Resolver r)
Adds a new resolver to be used by this ExtendedResolver |
void |
deleteResolver(Resolver r)
Deletes a resolver used by this ExtendedResolver |
Resolver |
getResolver(int n)
Returns the nth resolver used by this ExtendedResolver |
Resolver[] |
getResolvers()
Returns all resolvers used by this ExtendedResolver |
Message |
send(Message query)
Sends a message and waits for a response. |
Object |
sendAsync(Message query,
ResolverListener listener)
Asynchronously sends a message to multiple servers, potentially multiple times, 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 |
setLoadBalance(boolean flag)
Sets whether the servers should be load balanced. |
void |
setPort(int port)
Sets the port to communicate with on the server |
void |
setRetries(int retries)
Sets the number of retries sent to each server per query |
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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ExtendedResolver()
throws UnknownHostException
UnknownHostException - Failure occured initializing SimpleResolversSimpleResolver,
FindServer
public ExtendedResolver(String[] servers)
throws UnknownHostException
servers - An array of server names for which SimpleResolver
contexts should be initialized.
UnknownHostException - Failure occured initializing SimpleResolversSimpleResolver
public ExtendedResolver(Resolver[] res)
throws UnknownHostException
res - An array of pre-initialized Resolvers is provided.
UnknownHostException - Failure occured initializing SimpleResolversSimpleResolver| Method Detail |
public void setPort(int port)
Resolver
setPort in interface Resolverport - The port to send messages topublic void setTCP(boolean flag)
Resolver
setTCP in interface Resolverflag - Indicates whether TCP connections are madepublic void setIgnoreTruncation(boolean flag)
Resolver
setIgnoreTruncation in interface Resolverflag - Indicates whether truncated responses should be ignored.public void setEDNS(int level)
Resolver
setEDNS in interface Resolverlevel - The EDNS level to use. 0 indicates EDNS0 and -1 indicates no
EDNS.public void setTSIGKey(TSIG key)
Resolver
setTSIGKey in interface Resolverkey - The key
public void setTSIGKey(Name name,
byte[] key)
Resolver
setTSIGKey in interface Resolvername - The key namekey - The key data
public void setTSIGKey(String name,
String key)
Resolver
setTSIGKey in interface Resolvername - The key namekey - The key data, represented as either a base64 encoded string
or (if the first character is ':') a hex encoded string
public void setTSIGKey(String key)
throws UnknownHostException
Resolver
setTSIGKey in interface Resolverkey - The key data, represented as either a base64 encoded string
or (if the first character is ':') a hex encoded string
UnknownHostException - The local host name could not be determinedpublic void setTimeout(int secs)
Resolver
setTimeout in interface Resolversecs - The number of seconds to wait.
public Message send(Message query)
throws IOException
send in interface Resolverquery - The query to send.
IOException - An error occurred while sending or receiving.
public Object sendAsync(Message query,
ResolverListener listener)
sendAsync in interface Resolverquery - The query to sendlistener - The object containing the callbacks.
public Resolver getResolver(int n)
public Resolver[] getResolvers()
public void addResolver(Resolver r)
public void deleteResolver(Resolver r)
public void setLoadBalance(boolean flag)
flag - If true, servers will be tried in round-robin order. If false,
servers will always be queried in the same order.public void setRetries(int retries)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||