Top Description Constructors Methods
io.netty.handler.codec.dns

public Class DefaultDnsQuery

extends AbstractDnsMessage
implements DnsQuery
Class Inheritance
All Implemented Interfaces
io.netty.handler.codec.dns.DnsQuery, io.netty.handler.codec.dns.DnsMessage, io.netty.util.ReferenceCounted
Known Direct Subclasses
io.netty.handler.codec.dns.DatagramDnsQuery
Annotations
@UnstableApi
Imports
io.netty.util.internal.UnstableApi

The default DnsQuery implementation.

Constructor Summary

AccessConstructor and Description
public
DefaultDnsQuery(int
the ID of the DNS query
id
)

Creates a new instance with the DnsOpCode#QUERY opCode.

public
DefaultDnsQuery(int
the ID of the DNS query
id
,
DnsOpCode
the opCode of the DNS query
opCode
)

Creates a new instance.

Method Summary

Modifier and TypeMethod and Description
public DnsQuery
addRecord(DnsSection section, DnsRecord record)

Overrides io.netty.handler.codec.dns.AbstractDnsMessage.addRecord.

Implements io.netty.handler.codec.dns.DnsQuery.addRecord, io.netty.handler.codec.dns.DnsMessage.addRecord.

Adds the specified record at the end of the specified section of this DNS message.
public DnsQuery
addRecord(DnsSection section, int index, DnsRecord record)

Overrides io.netty.handler.codec.dns.AbstractDnsMessage.addRecord.

Implements io.netty.handler.codec.dns.DnsQuery.addRecord, io.netty.handler.codec.dns.DnsMessage.addRecord.

Adds the specified record at the specified index of the specified section of this DNS message.
public DnsQuery
clear(DnsSection section)

Overrides io.netty.handler.codec.dns.AbstractDnsMessage.clear.

Implements io.netty.handler.codec.dns.DnsQuery.clear, io.netty.handler.codec.dns.DnsMessage.clear.

Removes all the records in the specified section of this DNS message.
public DnsQuery
public DnsQuery
public DnsQuery
public DnsQuery
public DnsQuery
public DnsQuery
setRecord(DnsSection section, DnsRecord record)

Overrides io.netty.handler.codec.dns.AbstractDnsMessage.setRecord.

Implements io.netty.handler.codec.dns.DnsQuery.setRecord, io.netty.handler.codec.dns.DnsMessage.setRecord.

Sets the specified section of this DNS message to the specified record, making it a single-record section.
public DnsQuery
public DnsQuery
setZ(int z)

Overrides io.netty.handler.codec.dns.AbstractDnsMessage.setZ.

Implements io.netty.handler.codec.dns.DnsQuery.setZ, io.netty.handler.codec.dns.DnsMessage.setZ.

Sets the Z (reserved for future use) field of this DNS message.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public DnsQuery
public DnsQuery
touch(Object hint)

Overrides io.netty.handler.codec.dns.AbstractDnsMessage.touch.

Implements io.netty.handler.codec.dns.DnsQuery.touch, io.netty.handler.codec.dns.DnsMessage.touch, io.netty.util.ReferenceCounted.touch.

Records the current access location of this object with an additional arbitrary information for debugging purposes.
Inherited from io.netty.handler.codec.dns.AbstractDnsMessage:
countcountdeallocateequalshashCodeidisRecursionDesiredopCoderecordAtrecordAtremoveRecordsetRecordz

Constructor Detail

DefaultDnsQueryback to summary
public DefaultDnsQuery(int id)

Creates a new instance with the DnsOpCode#QUERY opCode.

Parameters
id:int

the ID of the DNS query

DefaultDnsQueryback to summary
public DefaultDnsQuery(int id, DnsOpCode opCode)

Creates a new instance.

Parameters
id:int

the ID of the DNS query

opCode:DnsOpCode

the opCode of the DNS query

Method Detail

addRecordback to summary
public DnsQuery addRecord(DnsSection section, DnsRecord record)

Overrides io.netty.handler.codec.dns.AbstractDnsMessage.addRecord.

Implements io.netty.handler.codec.dns.DnsQuery.addRecord, io.netty.handler.codec.dns.DnsMessage.addRecord.

Doc from io.netty.handler.codec.dns.DnsMessage.addRecord.

Adds the specified 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.

Annotations
@Override
addRecordback to summary
public DnsQuery addRecord(DnsSection section, int index, DnsRecord record)

Overrides io.netty.handler.codec.dns.AbstractDnsMessage.addRecord.

Implements io.netty.handler.codec.dns.DnsQuery.addRecord, io.netty.handler.codec.dns.DnsMessage.addRecord.

Doc from io.netty.handler.codec.dns.DnsMessage.addRecord.

Adds the specified 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.

Annotations
@Override
clearback to summary
public DnsQuery clear(DnsSection section)

Overrides io.netty.handler.codec.dns.AbstractDnsMessage.clear.

Implements io.netty.handler.codec.dns.DnsQuery.clear, io.netty.handler.codec.dns.DnsMessage.clear.

Doc from io.netty.handler.codec.dns.DnsMessage.clear.

Removes all the records in the specified section of this DNS message.

Annotations
@Override
clearback to summary
public DnsQuery clear()

Overrides io.netty.handler.codec.dns.AbstractDnsMessage.clear.

Implements io.netty.handler.codec.dns.DnsQuery.clear, io.netty.handler.codec.dns.DnsMessage.clear.

Doc from io.netty.handler.codec.dns.DnsMessage.clear.

Removes all the records in this DNS message.

Annotations
@Override
retainback to summary
public DnsQuery retain()

Overrides io.netty.handler.codec.dns.AbstractDnsMessage.retain.

Implements io.netty.handler.codec.dns.DnsQuery.retain, io.netty.handler.codec.dns.DnsMessage.retain, io.netty.util.ReferenceCounted.retain.

Doc from io.netty.util.ReferenceCounted.retain.

Increases the reference count by 1.

Annotations
@Override
retainback to summary
public DnsQuery retain(int increment)

Overrides io.netty.handler.codec.dns.AbstractDnsMessage.retain.

Implements io.netty.handler.codec.dns.DnsQuery.retain, io.netty.handler.codec.dns.DnsMessage.retain, io.netty.util.ReferenceCounted.retain.

Doc from io.netty.util.ReferenceCounted.retain.

Increases the reference count by the specified increment.

Annotations
@Override
setIdback to summary
public DnsQuery setId(int id)

Overrides io.netty.handler.codec.dns.AbstractDnsMessage.setId.

Implements io.netty.handler.codec.dns.DnsQuery.setId, io.netty.handler.codec.dns.DnsMessage.setId.

Doc from io.netty.handler.codec.dns.DnsMessage.setId.

Sets the ID of this DNS message.

Annotations
@Override
setOpCodeback to summary
public DnsQuery setOpCode(DnsOpCode opCode)

Overrides io.netty.handler.codec.dns.AbstractDnsMessage.setOpCode.

Implements io.netty.handler.codec.dns.DnsQuery.setOpCode, io.netty.handler.codec.dns.DnsMessage.setOpCode.

Doc from io.netty.handler.codec.dns.DnsMessage.setOpCode.

Sets the opCode of this DNS message.

Annotations
@Override
setRecordback to summary
public DnsQuery setRecord(DnsSection section, DnsRecord record)

Overrides io.netty.handler.codec.dns.AbstractDnsMessage.setRecord.

Implements io.netty.handler.codec.dns.DnsQuery.setRecord, io.netty.handler.codec.dns.DnsMessage.setRecord.

Doc from io.netty.handler.codec.dns.DnsMessage.setRecord.

Sets the specified 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.

Annotations
@Override
setRecursionDesiredback to summary
public DnsQuery setRecursionDesired(boolean recursionDesired)

Overrides io.netty.handler.codec.dns.AbstractDnsMessage.setRecursionDesired.

Implements io.netty.handler.codec.dns.DnsQuery.setRecursionDesired, io.netty.handler.codec.dns.DnsMessage.setRecursionDesired.

Doc from io.netty.handler.codec.dns.DnsMessage.setRecursionDesired.

Sets the RD (recursion desired} field of this DNS message.

Annotations
@Override
setZback to summary
public DnsQuery setZ(int z)

Overrides io.netty.handler.codec.dns.AbstractDnsMessage.setZ.

Implements io.netty.handler.codec.dns.DnsQuery.setZ, io.netty.handler.codec.dns.DnsMessage.setZ.

Doc from io.netty.handler.codec.dns.DnsMessage.setZ.

Sets the Z (reserved for future use) field of this DNS message.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override
touchback to summary
public DnsQuery touch()

Overrides io.netty.handler.codec.dns.AbstractDnsMessage.touch.

Implements io.netty.handler.codec.dns.DnsQuery.touch, io.netty.handler.codec.dns.DnsMessage.touch, io.netty.util.ReferenceCounted.touch.

Doc from io.netty.util.ReferenceCounted.touch.

Records the current access location of this object for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you via ResourceLeakDetector. This method is a shortcut to touch(null).

Annotations
@Override
touchback to summary
public DnsQuery touch(Object hint)

Overrides io.netty.handler.codec.dns.AbstractDnsMessage.touch.

Implements io.netty.handler.codec.dns.DnsQuery.touch, io.netty.handler.codec.dns.DnsMessage.touch, io.netty.util.ReferenceCounted.touch.

Doc from io.netty.util.ReferenceCounted.touch.

Records the current access location of this object with an additional arbitrary information for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you via ResourceLeakDetector.

Annotations
@Override