-
- All Superinterfaces:
DnsMessage
,ReferenceCounted
- All Known Implementing Classes:
DatagramDnsQuery
,DefaultDnsQuery
@UnstableApi public interface DnsQuery extends DnsMessage
A DNS query message.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DnsQuery
addRecord(DnsSection section, int index, DnsRecord record)
Adds the specifiedrecord
at the specifiedindex
of the specifiedsection
of this DNS message.DnsQuery
addRecord(DnsSection section, DnsRecord record)
Adds the specifiedrecord
at the end of the specifiedsection
of this DNS message.DnsQuery
clear()
Removes all the records in this DNS message.DnsQuery
clear(DnsSection section)
Removes all the records in the specifiedsection
of this DNS message.DnsQuery
retain()
Increases the reference count by1
.DnsQuery
retain(int increment)
Increases the reference count by the specifiedincrement
.DnsQuery
setId(int id)
Sets theID
of this DNS message.DnsQuery
setOpCode(DnsOpCode opCode)
Sets theopCode
of this DNS message.DnsQuery
setRecord(DnsSection section, DnsRecord record)
Sets the specifiedsection
of this DNS message to the specifiedrecord
, making it a single-record section.DnsQuery
setRecursionDesired(boolean recursionDesired)
Sets theRD
(recursion desired} field of this DNS message.DnsQuery
setZ(int z)
Sets theZ
(reserved for future use) field of this DNS message.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.-
Methods inherited from interface io.netty5.handler.codec.dns.DnsMessage
count, count, id, isRecursionDesired, opCode, recordAt, recordAt, removeRecord, setRecord, z
-
Methods inherited from interface io.netty5.util.ReferenceCounted
refCnt, release, release
-
-
-
-
Method Detail
-
setId
DnsQuery setId(int id)
Description copied from interface:DnsMessage
Sets theID
of this DNS message.- Specified by:
setId
in interfaceDnsMessage
-
setOpCode
DnsQuery setOpCode(DnsOpCode opCode)
Description copied from interface:DnsMessage
Sets theopCode
of this DNS message.- Specified by:
setOpCode
in interfaceDnsMessage
-
setRecursionDesired
DnsQuery setRecursionDesired(boolean recursionDesired)
Description copied from interface:DnsMessage
Sets theRD
(recursion desired} field of this DNS message.- Specified by:
setRecursionDesired
in interfaceDnsMessage
-
setZ
DnsQuery setZ(int z)
Description copied from interface:DnsMessage
Sets theZ
(reserved for future use) field of this DNS message.- Specified by:
setZ
in interfaceDnsMessage
-
setRecord
DnsQuery setRecord(DnsSection section, DnsRecord record)
Description copied from interface:DnsMessage
Sets the specifiedsection
of this DNS message to the specifiedrecord
, making it a single-record section. When the specifiedsection
isDnsSection.QUESTION
, the specifiedrecord
must be aDnsQuestion
.- Specified by:
setRecord
in interfaceDnsMessage
-
addRecord
DnsQuery addRecord(DnsSection section, DnsRecord record)
Description copied from interface:DnsMessage
Adds the specifiedrecord
at the end of the specifiedsection
of this DNS message. When the specifiedsection
isDnsSection.QUESTION
, the specifiedrecord
must be aDnsQuestion
.- Specified by:
addRecord
in interfaceDnsMessage
-
addRecord
DnsQuery addRecord(DnsSection section, int index, DnsRecord record)
Description copied from interface:DnsMessage
Adds the specifiedrecord
at the specifiedindex
of the specifiedsection
of this DNS message. When the specifiedsection
isDnsSection.QUESTION
, the specifiedrecord
must be aDnsQuestion
.- Specified by:
addRecord
in interfaceDnsMessage
-
clear
DnsQuery clear(DnsSection section)
Description copied from interface:DnsMessage
Removes all the records in the specifiedsection
of this DNS message.- Specified by:
clear
in interfaceDnsMessage
-
clear
DnsQuery clear()
Description copied from interface:DnsMessage
Removes all the records in this DNS message.- Specified by:
clear
in interfaceDnsMessage
-
touch
DnsQuery touch()
Description copied from interface:ReferenceCounted
Records 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:
touch
in interfaceDnsMessage
- Specified by:
touch
in interfaceReferenceCounted
-
touch
DnsQuery touch(Object hint)
Description copied from interface:ReferenceCounted
Records 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:
touch
in interfaceDnsMessage
- Specified by:
touch
in interfaceReferenceCounted
-
retain
DnsQuery retain()
Description copied from interface:ReferenceCounted
Increases the reference count by1
.- Specified by:
retain
in interfaceDnsMessage
- Specified by:
retain
in interfaceReferenceCounted
-
retain
DnsQuery retain(int increment)
Description copied from interface:ReferenceCounted
Increases the reference count by the specifiedincrement
.- Specified by:
retain
in interfaceDnsMessage
- Specified by:
retain
in interfaceReferenceCounted
-
-