@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.
|
toString
count, count, deallocate, id, isRecursionDesired, opCode, recordAt, recordAt, removeRecord, setRecord, z
refCnt, release, release, setRefCnt
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
refCnt, release, release
count, count, id, isRecursionDesired, opCode, recordAt, recordAt, removeRecord, setRecord, z
public 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()
AddressedEnvelope
content
in interface AddressedEnvelope<DatagramDnsQuery,InetSocketAddress>
public InetSocketAddress sender()
AddressedEnvelope
sender
in interface AddressedEnvelope<DatagramDnsQuery,InetSocketAddress>
public InetSocketAddress recipient()
AddressedEnvelope
recipient
in interface AddressedEnvelope<DatagramDnsQuery,InetSocketAddress>
public DatagramDnsQuery setId(int id)
DnsMessage
ID
of this DNS message.setId
in interface DnsMessage
setId
in interface DnsQuery
setId
in class DefaultDnsQuery
public DatagramDnsQuery setOpCode(DnsOpCode opCode)
DnsMessage
opCode
of this DNS message.setOpCode
in interface DnsMessage
setOpCode
in interface DnsQuery
setOpCode
in class DefaultDnsQuery
public DatagramDnsQuery setRecursionDesired(boolean recursionDesired)
DnsMessage
RD
(recursion desired} field of this DNS message.setRecursionDesired
in interface DnsMessage
setRecursionDesired
in interface DnsQuery
setRecursionDesired
in class DefaultDnsQuery
public DatagramDnsQuery setZ(int z)
DnsMessage
Z
(reserved for future use) field of this DNS message.setZ
in interface DnsMessage
setZ
in interface DnsQuery
setZ
in class DefaultDnsQuery
public DatagramDnsQuery setRecord(DnsSection section, DnsRecord record)
DnsMessage
section
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 DnsMessage
setRecord
in interface DnsQuery
setRecord
in class DefaultDnsQuery
public DatagramDnsQuery addRecord(DnsSection section, DnsRecord record)
DnsMessage
record
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 DnsMessage
addRecord
in interface DnsQuery
addRecord
in class DefaultDnsQuery
public DatagramDnsQuery addRecord(DnsSection section, int index, DnsRecord record)
DnsMessage
record
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 DnsMessage
addRecord
in interface DnsQuery
addRecord
in class DefaultDnsQuery
public DatagramDnsQuery clear(DnsSection section)
DnsMessage
section
of this DNS message.clear
in interface DnsMessage
clear
in interface DnsQuery
clear
in class DefaultDnsQuery
public DatagramDnsQuery clear()
DnsMessage
clear
in interface DnsMessage
clear
in interface DnsQuery
clear
in class DefaultDnsQuery
public DatagramDnsQuery touch()
ReferenceCounted
ResourceLeakDetector
. This method is a shortcut to touch(null)
.touch
in interface AddressedEnvelope<DatagramDnsQuery,InetSocketAddress>
touch
in interface DnsMessage
touch
in interface DnsQuery
touch
in interface ReferenceCounted
touch
in class DefaultDnsQuery
public DatagramDnsQuery touch(Object hint)
ReferenceCounted
ResourceLeakDetector
.touch
in interface AddressedEnvelope<DatagramDnsQuery,InetSocketAddress>
touch
in interface DnsMessage
touch
in interface DnsQuery
touch
in interface ReferenceCounted
touch
in class DefaultDnsQuery
public DatagramDnsQuery retain()
ReferenceCounted
1
.retain
in interface AddressedEnvelope<DatagramDnsQuery,InetSocketAddress>
retain
in interface DnsMessage
retain
in interface DnsQuery
retain
in interface ReferenceCounted
retain
in class DefaultDnsQuery
public DatagramDnsQuery retain(int increment)
ReferenceCounted
increment
.retain
in interface AddressedEnvelope<DatagramDnsQuery,InetSocketAddress>
retain
in interface DnsMessage
retain
in interface DnsQuery
retain
in interface ReferenceCounted
retain
in class DefaultDnsQuery
public boolean equals(Object obj)
equals
in class AbstractDnsMessage
public int hashCode()
hashCode
in class AbstractDnsMessage
Copyright © 2008–2017 The Netty Project. All rights reserved.