@UnstableApi public class DefaultDnsQuery extends AbstractDnsMessage implements DnsQuery
DnsQuery implementation.| Constructor and Description |
|---|
DefaultDnsQuery(int id)
Creates a new instance with the
DnsOpCode.QUERY opCode. |
DefaultDnsQuery(int id,
DnsOpCode opCode)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
DnsQuery |
addRecord(DnsSection section,
DnsRecord record)
Adds the specified
record at the end of the specified section of this DNS message. |
DnsQuery |
addRecord(DnsSection section,
int index,
DnsRecord record)
Adds the specified
record at the specified index of the specified section
of this DNS message. |
DnsQuery |
clear()
Removes all the records in this DNS message.
|
DnsQuery |
clear(DnsSection section)
Removes all the records in the specified
section of this DNS message. |
DnsQuery |
retain()
Increases the reference count by
1. |
DnsQuery |
retain(int increment)
Increases the reference count by the specified
increment. |
DnsQuery |
setId(int id)
Sets the
ID of this DNS message. |
DnsQuery |
setOpCode(DnsOpCode opCode)
Sets the
opCode of this DNS message. |
DnsQuery |
setRecord(DnsSection section,
DnsRecord record)
Sets the specified
section of this DNS message to the specified record,
making it a single-record section. |
DnsQuery |
setRecursionDesired(boolean recursionDesired)
Sets the
RD (recursion desired} field of this DNS message. |
DnsQuery |
setZ(int z)
Sets the
Z (reserved for future use) field of this DNS message. |
String |
toString() |
DnsQuery |
touch()
Records the current access location of this object for debugging purposes.
|
DnsQuery |
touch(Object hint)
Records the current access location of this object with an additional arbitrary information for debugging
purposes.
|
count, count, deallocate, equals, hashCode, id, isRecursionDesired, opCode, recordAt, recordAt, removeRecord, setRecord, zrefCnt, release, release, setRefCntclone, finalize, getClass, notify, notifyAll, wait, wait, waitcount, count, id, isRecursionDesired, opCode, recordAt, recordAt, removeRecord, setRecord, zrefCnt, release, releasepublic DefaultDnsQuery(int id)
DnsOpCode.QUERY opCode.id - the ID of the DNS querypublic DefaultDnsQuery(int id,
DnsOpCode opCode)
id - the ID of the DNS queryopCode - the opCode of the DNS querypublic DnsQuery setId(int id)
DnsMessageID of this DNS message.setId in interface DnsMessagesetId in interface DnsQuerysetId in class AbstractDnsMessagepublic DnsQuery setOpCode(DnsOpCode opCode)
DnsMessageopCode of this DNS message.setOpCode in interface DnsMessagesetOpCode in interface DnsQuerysetOpCode in class AbstractDnsMessagepublic DnsQuery setRecursionDesired(boolean recursionDesired)
DnsMessageRD (recursion desired} field of this DNS message.setRecursionDesired in interface DnsMessagesetRecursionDesired in interface DnsQuerysetRecursionDesired in class AbstractDnsMessagepublic DnsQuery setZ(int z)
DnsMessageZ (reserved for future use) field of this DNS message.setZ in interface DnsMessagesetZ in interface DnsQuerysetZ in class AbstractDnsMessagepublic DnsQuery 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 AbstractDnsMessagepublic DnsQuery 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 AbstractDnsMessagepublic DnsQuery 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 AbstractDnsMessagepublic DnsQuery clear(DnsSection section)
DnsMessagesection of this DNS message.clear in interface DnsMessageclear in interface DnsQueryclear in class AbstractDnsMessagepublic DnsQuery clear()
DnsMessageclear in interface DnsMessageclear in interface DnsQueryclear in class AbstractDnsMessagepublic DnsQuery touch()
ReferenceCountedResourceLeakDetector. This method is a shortcut to touch(null).touch in interface DnsMessagetouch in interface DnsQuerytouch in interface ReferenceCountedtouch in class AbstractDnsMessagepublic DnsQuery touch(Object hint)
ReferenceCountedResourceLeakDetector.touch in interface DnsMessagetouch in interface DnsQuerytouch in interface ReferenceCountedtouch in class AbstractDnsMessagepublic DnsQuery retain()
ReferenceCounted1.retain in interface DnsMessageretain in interface DnsQueryretain in interface ReferenceCountedretain in class AbstractDnsMessagepublic DnsQuery retain(int increment)
ReferenceCountedincrement.retain in interface DnsMessageretain in interface DnsQueryretain in interface ReferenceCountedretain in class AbstractDnsMessageCopyright © 2008–2017 The Netty Project. All rights reserved.