| CustomDNS.VirtualDNS.Response
Response | public class Response extends Message (Code) | | A subclass of DNS.Message with extra methods for building responses.
Much of this code was adapted from Brian Wellington's jnamed code.
See Also: org.xbill.DNS.Message |
Constructor Summary | |
public | Response() Create a new Response object. |
Method Summary | |
public void | addRRset(Name name, RRset rrset) Add the answer records for a given name, expanding any wildcards.
If a name matches any wildcard records, we need to replace the
wildcard with the actual name before returning the records.
This function was adapted from Brian Wellington's jnamed code.
All the signature-related code was removed. | public void | truncate(int maxLength) Truncate the response to fit within the available packet size.
This function was adapted from Brian Wellington's jnamed code.
XXX - It's not actually clear that we always produce a small
enough packet. | public int | wireLength() Figure out how large this response will be when we send it. |
Response | public Response()(Code) | | Create a new Response object.
|
addRRset | public void addRRset(Name name, RRset rrset)(Code) | | Add the answer records for a given name, expanding any wildcards.
If a name matches any wildcard records, we need to replace the
wildcard with the actual name before returning the records.
This function was adapted from Brian Wellington's jnamed code.
All the signature-related code was removed. We're probably not
seeing any wildcard matches in our current application.
Parameters: name - The DNS name associated with these records. Parameters: rrset - A list of answer records. |
truncate | public void truncate(int maxLength) throws IOException(Code) | | Truncate the response to fit within the available packet size.
This function was adapted from Brian Wellington's jnamed code.
XXX - It's not actually clear that we always produce a small
enough packet. This should be investigated.
Parameters: maxLength - Maximum permissible packet size. |
wireLength | public int wireLength() throws IOException(Code) | | Figure out how large this response will be when we send it.
Calling this function is fairly expensive.
The size of this response packet, in bytes. |
|
|