DnsMessage Type — netty Architecture
Architecture documentation for the DnsMessage type/interface in DnsMessage.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD b85afdec_1de9_a523_fb4d_e32da0a49fac["DnsMessage"] 7cf5a8ba_ae92_1409_fb5f_a769c1ddabd3["DnsMessage.java"] b85afdec_1de9_a523_fb4d_e32da0a49fac -->|defined in| 7cf5a8ba_ae92_1409_fb5f_a769c1ddabd3 style b85afdec_1de9_a523_fb4d_e32da0a49fac fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-dns/src/main/java/io/netty/handler/codec/dns/DnsMessage.java lines 23–156
public interface DnsMessage extends ReferenceCounted {
/**
* Returns the {@code ID} of this DNS message.
*/
int id();
/**
* Sets the {@code ID} of this DNS message.
*/
DnsMessage setId(int id);
/**
* Returns the {@code opCode} of this DNS message.
*/
DnsOpCode opCode();
/**
* Sets the {@code opCode} of this DNS message.
*/
DnsMessage setOpCode(DnsOpCode opCode);
/**
* Returns the {@code RD} (recursion desired} field of this DNS message.
*/
boolean isRecursionDesired();
/**
* Sets the {@code RD} (recursion desired} field of this DNS message.
*/
DnsMessage setRecursionDesired(boolean recursionDesired);
/**
* Returns the {@code Z} (reserved for future use) field of this DNS message.
*/
int z();
/**
* Sets the {@code Z} (reserved for future use) field of this DNS message.
*/
DnsMessage setZ(int z);
/**
* Returns the number of records in the specified {@code section} of this DNS message.
*/
int count(DnsSection section);
/**
* Returns the number of records in this DNS message.
*/
int count();
/**
* Returns the first record in the specified {@code section} of this DNS message.
* When the specified {@code section} is {@link DnsSection#QUESTION}, the type of the returned record is
* always {@link DnsQuestion}.
*
* @return {@code null} if this message doesn't have any records in the specified {@code section}
*/
<T extends DnsRecord> T recordAt(DnsSection section);
/**
* Returns the record at the specified {@code index} of the specified {@code section} of this DNS message.
* When the specified {@code section} is {@link DnsSection#QUESTION}, the type of the returned record is
* always {@link DnsQuestion}.
*
* @throws IndexOutOfBoundsException if the specified {@code index} is out of bounds
*/
<T extends DnsRecord> T recordAt(DnsSection section, int index);
/**
* Sets the specified {@code section} of this DNS message to the specified {@code record},
* making it a single-record section. When the specified {@code section} is {@link DnsSection#QUESTION},
* the specified {@code record} must be a {@link DnsQuestion}.
*/
DnsMessage setRecord(DnsSection section, DnsRecord record);
/**
* Sets the specified {@code record} at the specified {@code index} of the specified {@code section}
* of this DNS message. When the specified {@code section} is {@link DnsSection#QUESTION},
* the specified {@code record} must be a {@link DnsQuestion}.
Source
Frequently Asked Questions
What is the DnsMessage type?
DnsMessage is a type/interface in the netty codebase, defined in codec-dns/src/main/java/io/netty/handler/codec/dns/DnsMessage.java.
Where is DnsMessage defined?
DnsMessage is defined in codec-dns/src/main/java/io/netty/handler/codec/dns/DnsMessage.java at line 23.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free