Class AbstractDnsMessage

    • Constructor Detail

      • AbstractDnsMessage

        protected AbstractDnsMessage​(int id)
        Creates a new instance with the specified id and DnsOpCode.QUERY opCode.
      • AbstractDnsMessage

        protected AbstractDnsMessage​(int id,
                                     DnsOpCode opCode)
        Creates a new instance with the specified id and opCode.
    • Method Detail

      • id

        public int id()
        Description copied from interface: DnsMessage
        Returns the ID of this DNS message.
        Specified by:
        id in interface DnsMessage
      • isRecursionDesired

        public boolean isRecursionDesired()
        Description copied from interface: DnsMessage
        Returns the RD (recursion desired} field of this DNS message.
        Specified by:
        isRecursionDesired in interface DnsMessage
      • setRecursionDesired

        public DnsMessage setRecursionDesired​(boolean recursionDesired)
        Description copied from interface: DnsMessage
        Sets the RD (recursion desired} field of this DNS message.
        Specified by:
        setRecursionDesired in interface DnsMessage
      • z

        public int z()
        Description copied from interface: DnsMessage
        Returns the Z (reserved for future use) field of this DNS message.
        Specified by:
        z in interface DnsMessage
      • setZ

        public DnsMessage setZ​(int z)
        Description copied from interface: DnsMessage
        Sets the Z (reserved for future use) field of this DNS message.
        Specified by:
        setZ in interface DnsMessage
      • count

        public int count​(DnsSection section)
        Description copied from interface: DnsMessage
        Returns the number of records in the specified section of this DNS message.
        Specified by:
        count in interface DnsMessage
      • count

        public int count()
        Description copied from interface: DnsMessage
        Returns the number of records in this DNS message.
        Specified by:
        count in interface DnsMessage
      • recordAt

        public <T extends DnsRecord> T recordAt​(DnsSection section)
        Description copied from interface: DnsMessage
        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.
        Specified by:
        recordAt in interface DnsMessage
        Returns:
        null if this message doesn't have any records in the specified section
      • removeRecord

        public <T extends DnsRecord> T removeRecord​(DnsSection section,
                                                    int index)
        Description copied from interface: DnsMessage
        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.
        Specified by:
        removeRecord in interface DnsMessage
        Returns:
        the removed record
      • touch

        public DnsMessage touch()
        Specified by:
        touch in interface DnsMessage
        Specified by:
        touch in interface io.netty.util.ReferenceCounted
        Overrides:
        touch in class io.netty.util.AbstractReferenceCounted
      • touch

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

        public DnsMessage retain()
        Specified by:
        retain in interface DnsMessage
        Specified by:
        retain in interface io.netty.util.ReferenceCounted
        Overrides:
        retain in class io.netty.util.AbstractReferenceCounted
      • retain

        public DnsMessage retain​(int increment)
        Specified by:
        retain in interface DnsMessage
        Specified by:
        retain in interface io.netty.util.ReferenceCounted
        Overrides:
        retain in class io.netty.util.AbstractReferenceCounted
      • deallocate

        protected void deallocate()
        Specified by:
        deallocate in class io.netty.util.AbstractReferenceCounted
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object