Interface DnsQuery

All Superinterfaces:
DnsMessage, ReferenceCounted
All Known Implementing Classes:
DatagramDnsQuery, DefaultDnsQuery

public interface DnsQuery extends DnsMessage
A DNS query message.
  • Method Summary

    Modifier and Type
    Method
    Description
    addRecord(DnsSection section, int index, DnsRecord record)
    Adds the specified record at the specified index of the specified section of this DNS message.
    addRecord(DnsSection section, DnsRecord record)
    Adds the specified record at the end of the specified section of this DNS message.
    Removes all the records in this DNS message.
    clear(DnsSection section)
    Removes all the records in the specified section of this DNS message.
    Increases the reference count by 1.
    retain(int increment)
    Increases the reference count by the specified increment.
    setId(int id)
    Sets the ID of this DNS message.
    Sets the opCode of this DNS message.
    setRecord(DnsSection section, DnsRecord record)
    Sets the specified section of this DNS message to the specified record, making it a single-record section.
    setRecursionDesired(boolean recursionDesired)
    Sets the RD (recursion desired} field of this DNS message.
    setZ(int z)
    Sets the Z (reserved for future use) field of this DNS message.
    Records the current access location of this object for debugging purposes.
    touch(Object hint)
    Records the current access location of this object with an additional arbitrary information for debugging purposes.

    Methods inherited from interface DnsMessage

    count, count, id, isRecursionDesired, opCode, recordAt, recordAt, removeRecord, setRecord, z
    Modifier and Type
    Method
    Description
    int
    Returns the number of records in this DNS message.
    int
    count(DnsSection section)
    Returns the number of records in the specified section of this DNS message.
    int
    id()
    Returns the ID of this DNS message.
    boolean
    Returns the RD (recursion desired} field of this DNS message.
    Returns the opCode of this DNS message.
    <T extends DnsRecord>
    T
    Returns the first record in the specified section of this DNS message.
    <T extends DnsRecord>
    T
    recordAt(DnsSection section, int index)
    Returns the record at the specified index of the specified section of this DNS message.
    <T extends DnsRecord>
    T
    removeRecord(DnsSection section, int index)
    Removes the record at the specified index of the specified section from this DNS message.
    <T extends DnsRecord>
    T
    setRecord(DnsSection section, int index, DnsRecord record)
    Sets the specified record at the specified index of the specified section of this DNS message.
    int
    z()
    Returns the Z (reserved for future use) field of this DNS message.

    Methods inherited from interface ReferenceCounted

    refCnt, release, release
    Modifier and Type
    Method
    Description
    int
    Returns the reference count of this object.
    boolean
    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.