public abstract class DnsMessage extends AbstractReferenceCounted
| Modifier and Type | Method and Description |
|---|---|
DnsMessage |
addAdditionalResource(DnsResource resource)
Adds an additional resource record to this message.
|
DnsMessage |
addAnswer(DnsResource answer)
Adds an answer resource record to this message.
|
DnsMessage |
addAuthorityResource(DnsResource resource)
Adds an authority resource record to this message.
|
List<DnsResource> |
additionalResources()
Returns a list of all the additional resource records in this message.
|
DnsMessage |
addQuestion(DnsQuestion question)
Adds a question to this message.
|
List<DnsResource> |
answers()
Returns a list of all the answer resource records in this message.
|
List<DnsResource> |
authorityResources()
Returns a list of all the authority resource records in this message.
|
protected void |
deallocate()
Called once
AbstractReferenceCounted.refCnt() is equals 0. |
DnsHeader |
header()
Returns the header belonging to this message.
|
protected abstract DnsHeader |
newHeader(int id) |
List<DnsQuestion> |
questions()
Returns a list of all the questions in this message.
|
boolean |
release()
Decreases the reference count by
1 and deallocates this object if the reference count reaches at
0. |
boolean |
release(int decrement)
Decreases the reference count by the specified
decrement and deallocates this object if the reference
count reaches at 0. |
DnsMessage |
retain()
Increases the reference count by
1. |
DnsMessage |
retain(int increment)
Increases the reference count by the specified
increment. |
DnsMessage |
touch()
Records the current access location of this object for debugging purposes.
|
DnsMessage |
touch(Object hint)
Records the current access location of this object with an additonal arbitrary information for debugging
purposes.
|
refCnt, setRefCntpublic DnsHeader header()
public List<DnsQuestion> questions()
public List<DnsResource> answers()
public List<DnsResource> authorityResources()
public List<DnsResource> additionalResources()
public DnsMessage addAnswer(DnsResource answer)
answer - the answer resource record to be addedpublic DnsMessage addQuestion(DnsQuestion question)
question - the question to be addedpublic DnsMessage addAuthorityResource(DnsResource resource)
resource - the authority resource record to be addedpublic DnsMessage addAdditionalResource(DnsResource resource)
resource - the additional resource record to be addedprotected void deallocate()
AbstractReferenceCountedAbstractReferenceCounted.refCnt() is equals 0.deallocate in class AbstractReferenceCountedpublic boolean release()
ReferenceCounted1 and deallocates this object if the reference count reaches at
0.release in interface ReferenceCountedrelease in class AbstractReferenceCountedtrue if and only if the reference count became 0 and this object has been deallocatedpublic boolean release(int decrement)
ReferenceCounteddecrement and deallocates this object if the reference
count reaches at 0.release in interface ReferenceCountedrelease in class AbstractReferenceCountedtrue if and only if the reference count became 0 and this object has been deallocatedpublic DnsMessage touch(Object hint)
ReferenceCountedResourceLeakDetector.public DnsMessage retain()
ReferenceCounted1.retain in interface ReferenceCountedretain in class AbstractReferenceCountedpublic DnsMessage retain(int increment)
ReferenceCountedincrement.retain in interface ReferenceCountedretain in class AbstractReferenceCountedpublic DnsMessage touch()
ReferenceCountedResourceLeakDetector. This method is a shortcut to touch(null).touch in interface ReferenceCountedtouch in class AbstractReferenceCountedprotected abstract DnsHeader newHeader(int id)
Copyright © 2008–2015 The Netty Project. All rights reserved.