public class DnsQuery extends DnsMessage
Constructor and Description |
---|
DnsQuery(int id,
InetSocketAddress recipient)
Constructs a DNS query.
|
Modifier and Type | Method and Description |
---|---|
DnsQuery |
addAdditionalResource(DnsResource resource)
Adds an additional resource record to this message.
|
DnsQuery |
addAnswer(DnsResource answer)
Adds an answer resource record to this message.
|
DnsQuery |
addAuthorityResource(DnsResource resource)
Adds an authority resource record to this message.
|
DnsQuery |
addQuestion(DnsQuestion question)
Adds a question to this message.
|
DnsQueryHeader |
header()
Returns the header belonging to this message.
|
protected DnsQueryHeader |
newHeader(int id) |
InetSocketAddress |
recipient()
Return the
InetSocketAddress of the recipient of the DnsQuery |
DnsQuery |
retain()
Increases the reference count by
1 . |
DnsQuery |
retain(int increment)
Increases the reference count by the specified
increment . |
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 additonal arbitrary information for debugging
purposes.
|
additionalResources, answers, authorityResources, deallocate, questions, release, release
refCnt, setRefCnt
public DnsQuery(int id, InetSocketAddress recipient)
public InetSocketAddress recipient()
InetSocketAddress
of the recipient of the DnsQuery
public DnsQuery addAnswer(DnsResource answer)
DnsMessage
addAnswer
in class DnsMessage
answer
- the answer resource record to be addedpublic DnsQuery addQuestion(DnsQuestion question)
DnsMessage
addQuestion
in class DnsMessage
question
- the question to be addedpublic DnsQuery addAuthorityResource(DnsResource resource)
DnsMessage
addAuthorityResource
in class DnsMessage
resource
- the authority resource record to be addedpublic DnsQuery addAdditionalResource(DnsResource resource)
DnsMessage
addAdditionalResource
in class DnsMessage
resource
- the additional resource record to be addedpublic DnsQuery touch(Object hint)
ReferenceCounted
ResourceLeakDetector
.touch
in interface ReferenceCounted
touch
in class DnsMessage
public DnsQuery retain()
ReferenceCounted
1
.retain
in interface ReferenceCounted
retain
in class DnsMessage
public DnsQuery retain(int increment)
ReferenceCounted
increment
.retain
in interface ReferenceCounted
retain
in class DnsMessage
public DnsQuery touch()
ReferenceCounted
ResourceLeakDetector
. This method is a shortcut to touch(null)
.touch
in interface ReferenceCounted
touch
in class DnsMessage
public DnsQueryHeader header()
DnsMessage
header
in class DnsMessage
protected DnsQueryHeader newHeader(int id)
newHeader
in class DnsMessage
Copyright © 2008–2015 The Netty Project. All rights reserved.