public class DatagramDnsResponse extends DefaultDnsResponse implements AddressedEnvelope<DatagramDnsResponse,InetSocketAddress>
DnsResponse implementation for UDP/IP.| Constructor and Description |
|---|
DatagramDnsResponse(InetSocketAddress sender,
InetSocketAddress recipient,
int id)
|
DatagramDnsResponse(InetSocketAddress sender,
InetSocketAddress recipient,
int id,
DnsOpCode opCode)
Creates a new instance with the
DnsResponseCode.NOERROR responseCode. |
DatagramDnsResponse(InetSocketAddress sender,
InetSocketAddress recipient,
int id,
DnsOpCode opCode,
DnsResponseCode responseCode)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
DatagramDnsResponse |
addRecord(DnsSection section,
DnsRecord record)
Adds the specified
record at the end of the specified section of this DNS message. |
DatagramDnsResponse |
addRecord(DnsSection section,
int index,
DnsRecord record)
Adds the specified
record at the specified index of the specified section
of this DNS message. |
DatagramDnsResponse |
clear()
Removes all the records in this DNS message.
|
DatagramDnsResponse |
clear(DnsSection section)
Removes all the records in the specified
section of this DNS message. |
DatagramDnsResponse |
content()
Returns the message wrapped by this envelope message.
|
boolean |
equals(Object obj) |
int |
hashCode() |
InetSocketAddress |
recipient()
Returns the address of the recipient of this message.
|
DatagramDnsResponse |
retain()
Increases the reference count by
1. |
DatagramDnsResponse |
retain(int increment)
Increases the reference count by the specified
increment. |
InetSocketAddress |
sender()
Returns the address of the sender of this message.
|
DatagramDnsResponse |
setAuthoritativeAnswer(boolean authoritativeAnswer)
Set to
true if responding server is authoritative for the domain
name in the query message. |
DatagramDnsResponse |
setCode(DnsResponseCode code)
Sets the response code for this message.
|
DatagramDnsResponse |
setId(int id)
Sets the
ID of this DNS message. |
DatagramDnsResponse |
setOpCode(DnsOpCode opCode)
Sets the
opCode of this DNS message. |
DatagramDnsResponse |
setRecord(DnsSection section,
DnsRecord record)
Sets the specified
section of this DNS message to the specified record,
making it a single-record section. |
DatagramDnsResponse |
setRecursionAvailable(boolean recursionAvailable)
Set to
true if DNS server can handle recursive queries. |
DatagramDnsResponse |
setRecursionDesired(boolean recursionDesired)
Sets the
RD (recursion desired} field of this DNS message. |
DatagramDnsResponse |
setTruncated(boolean truncated)
Set to
true if response has been truncated (usually happens for
responses over 512 bytes). |
DatagramDnsResponse |
setZ(int z)
Sets the
Z (reserved for future use) field of this DNS message. |
DatagramDnsResponse |
touch()
Records the current access location of this object for debugging purposes.
|
DatagramDnsResponse |
touch(Object hint)
Records the current access location of this object with an additional arbitrary information for debugging
purposes.
|
code, isAuthoritativeAnswer, isRecursionAvailable, isTruncated, toStringcount, count, deallocate, id, isRecursionDesired, opCode, recordAt, recordAt, removeRecord, setRecord, zrefCnt, release, release, setRefCntclone, finalize, getClass, notify, notifyAll, wait, wait, waitrefCnt, release, releasecount, count, id, isRecursionDesired, opCode, recordAt, recordAt, removeRecord, setRecord, zpublic DatagramDnsResponse(InetSocketAddress sender, InetSocketAddress recipient, int id)
sender - the address of the senderrecipient - the address of the recipientid - the ID of the DNS responsepublic DatagramDnsResponse(InetSocketAddress sender, InetSocketAddress recipient, int id, DnsOpCode opCode)
DnsResponseCode.NOERROR responseCode.sender - the address of the senderrecipient - the address of the recipientid - the ID of the DNS responseopCode - the opCode of the DNS responsepublic DatagramDnsResponse(InetSocketAddress sender, InetSocketAddress recipient, int id, DnsOpCode opCode, DnsResponseCode responseCode)
sender - the address of the senderrecipient - the address of the recipientid - the ID of the DNS responseopCode - the opCode of the DNS responseresponseCode - the RCODE of the DNS responsepublic DatagramDnsResponse content()
AddressedEnvelopecontent in interface AddressedEnvelope<DatagramDnsResponse,InetSocketAddress>public InetSocketAddress sender()
AddressedEnvelopesender in interface AddressedEnvelope<DatagramDnsResponse,InetSocketAddress>public InetSocketAddress recipient()
AddressedEnveloperecipient in interface AddressedEnvelope<DatagramDnsResponse,InetSocketAddress>public DatagramDnsResponse setAuthoritativeAnswer(boolean authoritativeAnswer)
DnsResponsetrue if responding server is authoritative for the domain
name in the query message.setAuthoritativeAnswer in interface DnsResponsesetAuthoritativeAnswer in class DefaultDnsResponseauthoritativeAnswer - flag for authoritative answerpublic DatagramDnsResponse setTruncated(boolean truncated)
DnsResponsetrue if response has been truncated (usually happens for
responses over 512 bytes).setTruncated in interface DnsResponsesetTruncated in class DefaultDnsResponsetruncated - flag for truncationpublic DatagramDnsResponse setRecursionAvailable(boolean recursionAvailable)
DnsResponsetrue if DNS server can handle recursive queries.setRecursionAvailable in interface DnsResponsesetRecursionAvailable in class DefaultDnsResponserecursionAvailable - flag for recursion availabilitypublic DatagramDnsResponse setCode(DnsResponseCode code)
DnsResponsesetCode in interface DnsResponsesetCode in class DefaultDnsResponsecode - the response codepublic DatagramDnsResponse setId(int id)
DnsMessageID of this DNS message.setId in interface DnsMessagesetId in interface DnsResponsesetId in class DefaultDnsResponsepublic DatagramDnsResponse setOpCode(DnsOpCode opCode)
DnsMessageopCode of this DNS message.setOpCode in interface DnsMessagesetOpCode in interface DnsResponsesetOpCode in class DefaultDnsResponsepublic DatagramDnsResponse setRecursionDesired(boolean recursionDesired)
DnsMessageRD (recursion desired} field of this DNS message.setRecursionDesired in interface DnsMessagesetRecursionDesired in interface DnsResponsesetRecursionDesired in class DefaultDnsResponsepublic DatagramDnsResponse setZ(int z)
DnsMessageZ (reserved for future use) field of this DNS message.setZ in interface DnsMessagesetZ in interface DnsResponsesetZ in class DefaultDnsResponsepublic DatagramDnsResponse setRecord(DnsSection section, DnsRecord record)
DnsMessagesection of this DNS message to the specified record,
making it a single-record section. When the specified section is DnsSection.QUESTION,
the specified record must be a DnsQuestion.setRecord in interface DnsMessagesetRecord in interface DnsResponsesetRecord in class DefaultDnsResponsepublic DatagramDnsResponse addRecord(DnsSection section, DnsRecord record)
DnsMessagerecord at the end of the specified section of this DNS message.
When the specified section is DnsSection.QUESTION, the specified record
must be a DnsQuestion.addRecord in interface DnsMessageaddRecord in interface DnsResponseaddRecord in class DefaultDnsResponsepublic DatagramDnsResponse addRecord(DnsSection section, int index, DnsRecord record)
DnsMessagerecord at the specified index of the specified section
of this DNS message. When the specified section is DnsSection.QUESTION, the specified
record must be a DnsQuestion.addRecord in interface DnsMessageaddRecord in interface DnsResponseaddRecord in class DefaultDnsResponsepublic DatagramDnsResponse clear(DnsSection section)
DnsMessagesection of this DNS message.clear in interface DnsMessageclear in interface DnsResponseclear in class DefaultDnsResponsepublic DatagramDnsResponse clear()
DnsMessageclear in interface DnsMessageclear in interface DnsResponseclear in class DefaultDnsResponsepublic DatagramDnsResponse touch()
ReferenceCountedResourceLeakDetector. This method is a shortcut to touch(null).touch in interface AddressedEnvelope<DatagramDnsResponse,InetSocketAddress>touch in interface DnsMessagetouch in interface DnsResponsetouch in interface ReferenceCountedtouch in class DefaultDnsResponsepublic DatagramDnsResponse touch(Object hint)
ReferenceCountedResourceLeakDetector.touch in interface AddressedEnvelope<DatagramDnsResponse,InetSocketAddress>touch in interface DnsMessagetouch in interface DnsResponsetouch in interface ReferenceCountedtouch in class DefaultDnsResponsepublic DatagramDnsResponse retain()
ReferenceCounted1.retain in interface AddressedEnvelope<DatagramDnsResponse,InetSocketAddress>retain in interface DnsMessageretain in interface DnsResponseretain in interface ReferenceCountedretain in class DefaultDnsResponsepublic DatagramDnsResponse retain(int increment)
ReferenceCountedincrement.retain in interface AddressedEnvelope<DatagramDnsResponse,InetSocketAddress>retain in interface DnsMessageretain in interface DnsResponseretain in interface ReferenceCountedretain in class DefaultDnsResponsepublic boolean equals(Object obj)
equals in class AbstractDnsMessagepublic int hashCode()
hashCode in class AbstractDnsMessageCopyright © 2008–2025 The Netty Project. All rights reserved.