@UnstableApi public class DatagramDnsQuery extends DefaultDnsQuery implements AddressedEnvelope<DatagramDnsQuery,InetSocketAddress>
DnsQuery implementation for UDP/IP.| Constructor and Description |
|---|
DatagramDnsQuery(InetSocketAddress sender,
InetSocketAddress recipient,
int id)
Creates a new instance with the
DnsOpCode.QUERY opCode. |
DatagramDnsQuery(InetSocketAddress sender,
InetSocketAddress recipient,
int id,
DnsOpCode opCode)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
DatagramDnsQuery |
addRecord(DnsSection section,
DnsRecord record)
Adds the specified
record at the end of the specified section of this DNS message. |
DatagramDnsQuery |
addRecord(DnsSection section,
int index,
DnsRecord record)
Adds the specified
record at the specified index of the specified section
of this DNS message. |
DatagramDnsQuery |
clear()
Removes all the records in this DNS message.
|
DatagramDnsQuery |
clear(DnsSection section)
Removes all the records in the specified
section of this DNS message. |
DatagramDnsQuery |
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.
|
DatagramDnsQuery |
retain()
Increases the reference count by
1. |
DatagramDnsQuery |
retain(int increment)
Increases the reference count by the specified
increment. |
InetSocketAddress |
sender()
Returns the address of the sender of this message.
|
DatagramDnsQuery |
setId(int id)
Sets the
ID of this DNS message. |
DatagramDnsQuery |
setOpCode(DnsOpCode opCode)
Sets the
opCode of this DNS message. |
DatagramDnsQuery |
setRecord(DnsSection section,
DnsRecord record)
Sets the specified
section of this DNS message to the specified record,
making it a single-record section. |
DatagramDnsQuery |
setRecursionDesired(boolean recursionDesired)
Sets the
RD (recursion desired} field of this DNS message. |
DatagramDnsQuery |
setZ(int z)
Sets the
Z (reserved for future use) field of this DNS message. |
DatagramDnsQuery |
touch()
Records the current access location of this object for debugging purposes.
|
DatagramDnsQuery |
touch(Object hint)
Records the current access location of this object with an additional arbitrary information for debugging
purposes.
|
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 DatagramDnsQuery(InetSocketAddress sender, InetSocketAddress recipient, int id)
DnsOpCode.QUERY opCode.sender - the address of the senderrecipient - the address of the recipientid - the ID of the DNS querypublic DatagramDnsQuery(InetSocketAddress sender, InetSocketAddress recipient, int id, DnsOpCode opCode)
sender - the address of the senderrecipient - the address of the recipientid - the ID of the DNS queryopCode - the opCode of the DNS querypublic DatagramDnsQuery content()
AddressedEnvelopecontent in interface AddressedEnvelope<DatagramDnsQuery,InetSocketAddress>public InetSocketAddress sender()
AddressedEnvelopesender in interface AddressedEnvelope<DatagramDnsQuery,InetSocketAddress>public InetSocketAddress recipient()
AddressedEnveloperecipient in interface AddressedEnvelope<DatagramDnsQuery,InetSocketAddress>public DatagramDnsQuery setId(int id)
DnsMessageID of this DNS message.setId in interface DnsMessagesetId in interface DnsQuerysetId in class DefaultDnsQuerypublic DatagramDnsQuery setOpCode(DnsOpCode opCode)
DnsMessageopCode of this DNS message.setOpCode in interface DnsMessagesetOpCode in interface DnsQuerysetOpCode in class DefaultDnsQuerypublic DatagramDnsQuery setRecursionDesired(boolean recursionDesired)
DnsMessageRD (recursion desired} field of this DNS message.setRecursionDesired in interface DnsMessagesetRecursionDesired in interface DnsQuerysetRecursionDesired in class DefaultDnsQuerypublic DatagramDnsQuery setZ(int z)
DnsMessageZ (reserved for future use) field of this DNS message.setZ in interface DnsMessagesetZ in interface DnsQuerysetZ in class DefaultDnsQuerypublic DatagramDnsQuery 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 DnsQuerysetRecord in class DefaultDnsQuerypublic DatagramDnsQuery 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 DnsQueryaddRecord in class DefaultDnsQuerypublic DatagramDnsQuery 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 DnsQueryaddRecord in class DefaultDnsQuerypublic DatagramDnsQuery clear(DnsSection section)
DnsMessagesection of this DNS message.clear in interface DnsMessageclear in interface DnsQueryclear in class DefaultDnsQuerypublic DatagramDnsQuery clear()
DnsMessageclear in interface DnsMessageclear in interface DnsQueryclear in class DefaultDnsQuerypublic DatagramDnsQuery touch()
ReferenceCountedResourceLeakDetector. This method is a shortcut to touch(null).touch in interface AddressedEnvelope<DatagramDnsQuery,InetSocketAddress>touch in interface DnsMessagetouch in interface DnsQuerytouch in interface ReferenceCountedtouch in class DefaultDnsQuerypublic DatagramDnsQuery touch(Object hint)
ReferenceCountedResourceLeakDetector.touch in interface AddressedEnvelope<DatagramDnsQuery,InetSocketAddress>touch in interface DnsMessagetouch in interface DnsQuerytouch in interface ReferenceCountedtouch in class DefaultDnsQuerypublic DatagramDnsQuery retain()
ReferenceCounted1.retain in interface AddressedEnvelope<DatagramDnsQuery,InetSocketAddress>retain in interface DnsMessageretain in interface DnsQueryretain in interface ReferenceCountedretain in class DefaultDnsQuerypublic DatagramDnsQuery retain(int increment)
ReferenceCountedincrement.retain in interface AddressedEnvelope<DatagramDnsQuery,InetSocketAddress>retain in interface DnsMessageretain in interface DnsQueryretain in interface ReferenceCountedretain in class DefaultDnsQuerypublic boolean equals(Object obj)
equals in class AbstractDnsMessagepublic int hashCode()
hashCode in class AbstractDnsMessageCopyright © 2008–2017 The Netty Project. All rights reserved.