@UnstableApi public class DatagramDnsResponse extends DefaultDnsResponse implements AddressedEnvelope<DatagramDnsResponse,java.net.InetSocketAddress>
DnsResponse implementation for UDP/IP.| 构造器和说明 |
|---|
DatagramDnsResponse(java.net.InetSocketAddress sender,
java.net.InetSocketAddress recipient,
int id)
|
DatagramDnsResponse(java.net.InetSocketAddress sender,
java.net.InetSocketAddress recipient,
int id,
DnsOpCode opCode)
Creates a new instance with the
DnsResponseCode.NOERROR responseCode. |
DatagramDnsResponse(java.net.InetSocketAddress sender,
java.net.InetSocketAddress recipient,
int id,
DnsOpCode opCode,
DnsResponseCode responseCode)
Creates a new instance.
|
| 限定符和类型 | 方法和说明 |
|---|---|
DatagramDnsResponse |
addRecord(DnsSection section,
DnsRecord record)
Adds the specified
record at the end of the specified section of this DNS message. |
DatagramDnsResponse |
addRecord(DnsSection section,
int index,
DnsRecord record)
Adds the specified
record at the specified index of the specified section
of this DNS message. |
DatagramDnsResponse |
clear()
Removes all the records in this DNS message.
|
DatagramDnsResponse |
clear(DnsSection section)
Removes all the records in the specified
section of this DNS message. |
DatagramDnsResponse |
content()
Returns the message wrapped by this envelope message.
|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
java.net.InetSocketAddress |
recipient()
Returns the address of the recipient of this message.
|
DatagramDnsResponse |
retain()
Increases the reference count by
1. |
DatagramDnsResponse |
retain(int increment)
Increases the reference count by the specified
increment. |
java.net.InetSocketAddress |
sender()
Returns the address of the sender of this message.
|
DatagramDnsResponse |
setAuthoritativeAnswer(boolean authoritativeAnswer)
Set to
true if responding server is authoritative for the domain
name in the query message. |
DatagramDnsResponse |
setCode(DnsResponseCode code)
Sets the response code for this message.
|
DatagramDnsResponse |
setId(int id)
Sets the
ID of this DNS message. |
DatagramDnsResponse |
setOpCode(DnsOpCode opCode)
Sets the
opCode of this DNS message. |
DatagramDnsResponse |
setRecord(DnsSection section,
DnsRecord record)
Sets the specified
section of this DNS message to the specified record,
making it a single-record section. |
DatagramDnsResponse |
setRecursionAvailable(boolean recursionAvailable)
Set to
true if DNS server can handle recursive queries. |
DatagramDnsResponse |
setRecursionDesired(boolean recursionDesired)
Sets the
RD (recursion desired} field of this DNS message. |
DatagramDnsResponse |
setTruncated(boolean truncated)
Set to
true if response has been truncated (usually happens for
responses over 512 bytes). |
DatagramDnsResponse |
setZ(int z)
Sets the
Z (reserved for future use) field of this DNS message. |
DatagramDnsResponse |
touch()
Records the current access location of this object for debugging purposes.
|
DatagramDnsResponse |
touch(java.lang.Object hint)
Records the current access location of this object with an additional arbitrary information for debugging
purposes.
|
code, isAuthoritativeAnswer, isRecursionAvailable, isTruncated, toStringcount, count, deallocate, id, isRecursionDesired, opCode, recordAt, recordAt, removeRecord, setRecord, zrefCnt, release, release, setRefCntrefCnt, release, releasecount, count, id, isRecursionDesired, opCode, recordAt, recordAt, removeRecord, setRecord, zpublic DatagramDnsResponse(java.net.InetSocketAddress sender,
java.net.InetSocketAddress recipient,
int id)
sender - the address of the senderrecipient - the address of the recipientid - the ID of the DNS responsepublic DatagramDnsResponse(java.net.InetSocketAddress sender,
java.net.InetSocketAddress recipient,
int id,
DnsOpCode opCode)
DnsResponseCode.NOERROR responseCode.sender - the address of the senderrecipient - the address of the recipientid - the ID of the DNS responseopCode - the opCode of the DNS responsepublic DatagramDnsResponse(java.net.InetSocketAddress sender,
java.net.InetSocketAddress recipient,
int id,
DnsOpCode opCode,
DnsResponseCode responseCode)
sender - the address of the senderrecipient - the address of the recipientid - the ID of the DNS responseopCode - the opCode of the DNS responseresponseCode - the RCODE of the DNS responsepublic DatagramDnsResponse content()
AddressedEnvelopecontent 在接口中 AddressedEnvelope<DatagramDnsResponse,java.net.InetSocketAddress>public java.net.InetSocketAddress sender()
AddressedEnvelopesender 在接口中 AddressedEnvelope<DatagramDnsResponse,java.net.InetSocketAddress>public java.net.InetSocketAddress recipient()
AddressedEnveloperecipient 在接口中 AddressedEnvelope<DatagramDnsResponse,java.net.InetSocketAddress>public DatagramDnsResponse setAuthoritativeAnswer(boolean authoritativeAnswer)
DnsResponsetrue if responding server is authoritative for the domain
name in the query message.setAuthoritativeAnswer 在接口中 DnsResponsesetAuthoritativeAnswer 在类中 DefaultDnsResponseauthoritativeAnswer - flag for authoritative answerpublic DatagramDnsResponse setTruncated(boolean truncated)
DnsResponsetrue if response has been truncated (usually happens for
responses over 512 bytes).setTruncated 在接口中 DnsResponsesetTruncated 在类中 DefaultDnsResponsetruncated - flag for truncationpublic DatagramDnsResponse setRecursionAvailable(boolean recursionAvailable)
DnsResponsetrue if DNS server can handle recursive queries.setRecursionAvailable 在接口中 DnsResponsesetRecursionAvailable 在类中 DefaultDnsResponserecursionAvailable - flag for recursion availabilitypublic DatagramDnsResponse setCode(DnsResponseCode code)
DnsResponsesetCode 在接口中 DnsResponsesetCode 在类中 DefaultDnsResponsecode - the response codepublic DatagramDnsResponse setId(int id)
DnsMessageID of this DNS message.setId 在接口中 DnsMessagesetId 在接口中 DnsResponsesetId 在类中 DefaultDnsResponsepublic DatagramDnsResponse setOpCode(DnsOpCode opCode)
DnsMessageopCode of this DNS message.setOpCode 在接口中 DnsMessagesetOpCode 在接口中 DnsResponsesetOpCode 在类中 DefaultDnsResponsepublic DatagramDnsResponse setRecursionDesired(boolean recursionDesired)
DnsMessageRD (recursion desired} field of this DNS message.setRecursionDesired 在接口中 DnsMessagesetRecursionDesired 在接口中 DnsResponsesetRecursionDesired 在类中 DefaultDnsResponsepublic DatagramDnsResponse setZ(int z)
DnsMessageZ (reserved for future use) field of this DNS message.setZ 在接口中 DnsMessagesetZ 在接口中 DnsResponsesetZ 在类中 DefaultDnsResponsepublic DatagramDnsResponse 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 在接口中 DnsMessagesetRecord 在接口中 DnsResponsesetRecord 在类中 DefaultDnsResponsepublic DatagramDnsResponse 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 在接口中 DnsMessageaddRecord 在接口中 DnsResponseaddRecord 在类中 DefaultDnsResponsepublic DatagramDnsResponse 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 在接口中 DnsMessageaddRecord 在接口中 DnsResponseaddRecord 在类中 DefaultDnsResponsepublic DatagramDnsResponse clear(DnsSection section)
DnsMessagesection of this DNS message.clear 在接口中 DnsMessageclear 在接口中 DnsResponseclear 在类中 DefaultDnsResponsepublic DatagramDnsResponse clear()
DnsMessageclear 在接口中 DnsMessageclear 在接口中 DnsResponseclear 在类中 DefaultDnsResponsepublic DatagramDnsResponse touch()
ReferenceCountedResourceLeakDetector. This method is a shortcut to touch(null).touch 在接口中 AddressedEnvelope<DatagramDnsResponse,java.net.InetSocketAddress>touch 在接口中 DnsMessagetouch 在接口中 DnsResponsetouch 在接口中 ReferenceCountedtouch 在类中 DefaultDnsResponsepublic DatagramDnsResponse touch(java.lang.Object hint)
ReferenceCountedResourceLeakDetector.touch 在接口中 AddressedEnvelope<DatagramDnsResponse,java.net.InetSocketAddress>touch 在接口中 DnsMessagetouch 在接口中 DnsResponsetouch 在接口中 ReferenceCountedtouch 在类中 DefaultDnsResponsepublic DatagramDnsResponse retain()
ReferenceCounted1.retain 在接口中 AddressedEnvelope<DatagramDnsResponse,java.net.InetSocketAddress>retain 在接口中 DnsMessageretain 在接口中 DnsResponseretain 在接口中 ReferenceCountedretain 在类中 DefaultDnsResponsepublic DatagramDnsResponse retain(int increment)
ReferenceCountedincrement.retain 在接口中 AddressedEnvelope<DatagramDnsResponse,java.net.InetSocketAddress>retain 在接口中 DnsMessageretain 在接口中 DnsResponseretain 在接口中 ReferenceCountedretain 在类中 DefaultDnsResponsepublic boolean equals(java.lang.Object obj)
equals 在类中 AbstractDnsMessagepublic int hashCode()
hashCode 在类中 AbstractDnsMessage