public final class DnsResponse extends DnsMessage
Constructor and Description |
---|
DnsResponse(int id,
InetSocketAddress sender) |
Modifier and Type | Method and Description |
---|---|
DnsResponse |
addAdditionalResource(DnsResource resource)
Adds an additional resource record to this message.
|
DnsResponse |
addAnswer(DnsResource answer)
Adds an answer resource record to this message.
|
DnsResponse |
addAuthorityResource(DnsResource resource)
Adds an authority resource record to this message.
|
DnsResponse |
addQuestion(DnsQuestion question)
Adds a question to this message.
|
DnsResponseHeader |
header()
Returns the header belonging to this message.
|
protected DnsResponseHeader |
newHeader(int id) |
DnsResponse |
retain()
Increases the reference count by
1 . |
DnsResponse |
retain(int increment)
Increases the reference count by the specified
increment . |
InetSocketAddress |
sender()
The
InetSocketAddress of the sender of this DnsResponse |
DnsResponse |
touch()
Records the current access location of this object for debugging purposes.
|
DnsResponse |
touch(Object hint)
Records the current access location of this object with an additonal arbitrary information for debugging
purposes.
|
additionalResources, answers, authorityResources, deallocate, questions, release, release
refCnt, setRefCnt
public DnsResponse(int id, InetSocketAddress sender)
public InetSocketAddress sender()
InetSocketAddress
of the sender of this DnsResponse
public DnsResponse addAnswer(DnsResource answer)
DnsMessage
addAnswer
in class DnsMessage
answer
- the answer resource record to be addedpublic DnsResponse addQuestion(DnsQuestion question)
DnsMessage
addQuestion
in class DnsMessage
question
- the question to be addedpublic DnsResponse addAuthorityResource(DnsResource resource)
DnsMessage
addAuthorityResource
in class DnsMessage
resource
- the authority resource record to be addedpublic DnsResponse addAdditionalResource(DnsResource resource)
DnsMessage
addAdditionalResource
in class DnsMessage
resource
- the additional resource record to be addedpublic DnsResponse touch(Object hint)
ReferenceCounted
ResourceLeakDetector
.touch
in interface ReferenceCounted
touch
in class DnsMessage
public DnsResponse retain()
ReferenceCounted
1
.retain
in interface ReferenceCounted
retain
in class DnsMessage
public DnsResponse retain(int increment)
ReferenceCounted
increment
.retain
in interface ReferenceCounted
retain
in class DnsMessage
public DnsResponse touch()
ReferenceCounted
ResourceLeakDetector
. This method is a shortcut to touch(null)
.touch
in interface ReferenceCounted
touch
in class DnsMessage
public DnsResponseHeader header()
DnsMessage
header
in class DnsMessage
protected DnsResponseHeader newHeader(int id)
newHeader
in class DnsMessage
Copyright © 2008–2015 The Netty Project. All rights reserved.