Interface DnsMessage

    • Method Detail

      • id

        int id()
        Returns the ID of this DNS message.
      • setId

        DnsMessage setId​(int id)
        Sets the ID of this DNS message.
      • opCode

        DnsOpCode opCode()
        Returns the opCode of this DNS message.
      • isRecursionDesired

        boolean isRecursionDesired()
        Returns the RD (recursion desired} field of this DNS message.
      • setRecursionDesired

        DnsMessage setRecursionDesired​(boolean recursionDesired)
        Sets the RD (recursion desired} field of this DNS message.
      • z

        int z()
        Returns the Z (reserved for future use) field of this DNS message.
      • setZ

        DnsMessage setZ​(int z)
        Sets the Z (reserved for future use) field of this DNS message.
      • count

        int count​(DnsSection section)
        Returns the number of records in the specified section of this DNS message.
      • count

        int count()
        Returns the number of records in this DNS message.
      • recordAt

        <T extends DnsRecord> T recordAt​(DnsSection section)
        Returns the first record in the specified section of this DNS message. When the specified section is DnsSection.QUESTION, the type of the returned record is always DnsQuestion.
        Returns:
        null if this message doesn't have any records in the specified section
      • removeRecord

        <T extends DnsRecord> T removeRecord​(DnsSection section,
                                             int index)
        Removes the record at the specified index of the specified section from this DNS message. When the specified section is DnsSection.QUESTION, the type of the returned record is always DnsQuestion.
        Returns:
        the removed record
      • clear

        DnsMessage clear​(DnsSection section)
        Removes all the records in the specified section of this DNS message.
      • clear

        DnsMessage clear()
        Removes all the records in this DNS message.
      • touch

        DnsMessage touch()
        Specified by:
        touch in interface io.netty.util.ReferenceCounted
      • touch

        DnsMessage touch​(Object hint)
        Specified by:
        touch in interface io.netty.util.ReferenceCounted
      • retain

        DnsMessage retain()
        Specified by:
        retain in interface io.netty.util.ReferenceCounted
      • retain

        DnsMessage retain​(int increment)
        Specified by:
        retain in interface io.netty.util.ReferenceCounted