Interface DnsQuery
- All Superinterfaces:
DnsMessage, ReferenceCounted
- All Known Implementing Classes:
DatagramDnsQuery, DefaultDnsQuery
A DNS query message.
-
Method Summary
Modifier and TypeMethodDescriptionaddRecord(DnsSection section, int index, DnsRecord record) Adds the specifiedrecordat the specifiedindexof the specifiedsectionof this DNS message.addRecord(DnsSection section, DnsRecord record) Adds the specifiedrecordat the end of the specifiedsectionof this DNS message.clear()Removes all the records in this DNS message.clear(DnsSection section) Removes all the records in the specifiedsectionof this DNS message.retain()Increases the reference count by1.retain(int increment) Increases the reference count by the specifiedincrement.setId(int id) Sets theIDof this DNS message.Sets theopCodeof this DNS message.setRecord(DnsSection section, DnsRecord record) Sets the specifiedsectionof this DNS message to the specifiedrecord, making it a single-record section.setRecursionDesired(boolean recursionDesired) Sets theRD(recursion desired} field of this DNS message.setZ(int z) Sets theZ(reserved for future use) field of this DNS message.touch()Records the current access location of this object for debugging purposes.Records the current access location of this object with an additional arbitrary information for debugging purposes.Methods inherited from interface DnsMessage
count, count, id, isRecursionDesired, opCode, recordAt, recordAt, removeRecord, setRecord, zModifier and TypeMethodDescriptionintcount()Returns the number of records in this DNS message.intcount(DnsSection section) Returns the number of records in the specifiedsectionof this DNS message.intid()Returns theIDof this DNS message.booleanReturns theRD(recursion desired} field of this DNS message.opCode()Returns theopCodeof this DNS message.<T extends DnsRecord>
TrecordAt(DnsSection section) Returns the first record in the specifiedsectionof this DNS message.<T extends DnsRecord>
TrecordAt(DnsSection section, int index) Returns the record at the specifiedindexof the specifiedsectionof this DNS message.<T extends DnsRecord>
TremoveRecord(DnsSection section, int index) Removes the record at the specifiedindexof the specifiedsectionfrom this DNS message.<T extends DnsRecord>
TsetRecord(DnsSection section, int index, DnsRecord record) Sets the specifiedrecordat the specifiedindexof the specifiedsectionof this DNS message.intz()Returns theZ(reserved for future use) field of this DNS message.Methods inherited from interface ReferenceCounted
refCnt, release, releaseModifier and TypeMethodDescriptionintrefCnt()Returns the reference count of this object.booleanrelease()Decreases the reference count by1and deallocates this object if the reference count reaches at0.booleanrelease(int decrement) Decreases the reference count by the specifieddecrementand deallocates this object if the reference count reaches at0.
-
Method Details
-
setId
Description copied from interface:DnsMessageSets theIDof this DNS message.- Specified by:
setIdin interfaceDnsMessage
-
setOpCode
Description copied from interface:DnsMessageSets theopCodeof this DNS message.- Specified by:
setOpCodein interfaceDnsMessage
-
setRecursionDesired
Description copied from interface:DnsMessageSets theRD(recursion desired} field of this DNS message.- Specified by:
setRecursionDesiredin interfaceDnsMessage
-
setZ
Description copied from interface:DnsMessageSets theZ(reserved for future use) field of this DNS message.- Specified by:
setZin interfaceDnsMessage
-
setRecord
Description copied from interface:DnsMessageSets the specifiedsectionof this DNS message to the specifiedrecord, making it a single-record section. When the specifiedsectionisDnsSection.QUESTION, the specifiedrecordmust be aDnsQuestion.- Specified by:
setRecordin interfaceDnsMessage
-
addRecord
Description copied from interface:DnsMessageAdds the specifiedrecordat the end of the specifiedsectionof this DNS message. When the specifiedsectionisDnsSection.QUESTION, the specifiedrecordmust be aDnsQuestion.- Specified by:
addRecordin interfaceDnsMessage
-
addRecord
Description copied from interface:DnsMessageAdds the specifiedrecordat the specifiedindexof the specifiedsectionof this DNS message. When the specifiedsectionisDnsSection.QUESTION, the specifiedrecordmust be aDnsQuestion.- Specified by:
addRecordin interfaceDnsMessage
-
clear
Description copied from interface:DnsMessageRemoves all the records in the specifiedsectionof this DNS message.- Specified by:
clearin interfaceDnsMessage
-
clear
DnsQuery clear()Description copied from interface:DnsMessageRemoves all the records in this DNS message.- Specified by:
clearin interfaceDnsMessage
-
touch
DnsQuery touch()Description copied from interface:ReferenceCountedRecords the current access location of this object for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you viaResourceLeakDetector. This method is a shortcut totouch(null).- Specified by:
touchin interfaceDnsMessage- Specified by:
touchin interfaceReferenceCounted
-
touch
Description copied from interface:ReferenceCountedRecords the current access location of this object with an additional arbitrary information for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you viaResourceLeakDetector.- Specified by:
touchin interfaceDnsMessage- Specified by:
touchin interfaceReferenceCounted
-
retain
DnsQuery retain()Description copied from interface:ReferenceCountedIncreases the reference count by1.- Specified by:
retainin interfaceDnsMessage- Specified by:
retainin interfaceReferenceCounted
-
retain
Description copied from interface:ReferenceCountedIncreases the reference count by the specifiedincrement.- Specified by:
retainin interfaceDnsMessage- Specified by:
retainin interfaceReferenceCounted
-