Class DNSTask

    • Constructor Detail

      • DNSTask

        protected DNSTask​(JmDNSImpl jmDNSImpl)
        Parameters:
        jmDNSImpl -
    • Method Detail

      • getDns

        public JmDNSImpl getDns()
        Return the DNS associated with this task.
        Returns:
        associated DNS
      • start

        public abstract void start​(Timer timer)
        Start this task.
        Parameters:
        timer - task timer.
      • getName

        public abstract String getName()
        Return this task name.
        Returns:
        task name
      • addAnswer

        public DNSOutgoing addAnswer​(DNSOutgoing out,
                                     DNSRecord rec,
                                     long now)
                              throws IOException
        Add an answer to the message.
        Parameters:
        out - outgoing message
        rec - DNS record answer
        now -
        Returns:
        outgoing message for the next answer
        Throws:
        IOException
      • addAuthoritativeAnswer

        public DNSOutgoing addAuthoritativeAnswer​(DNSOutgoing out,
                                                  DNSRecord rec)
                                           throws IOException
        Add an authoritative answer to the message.
        Parameters:
        out - outgoing message
        rec - DNS record answer
        Returns:
        outgoing message for the next answer
        Throws:
        IOException
      • addAdditionalAnswer

        public DNSOutgoing addAdditionalAnswer​(DNSOutgoing out,
                                               DNSIncoming in,
                                               DNSRecord rec)
                                        throws IOException
        Add an additional answer to the record. Omit if there is no room.
        Parameters:
        out - outgoing message
        in - incoming request
        rec - DNS record answer
        Returns:
        outgoing message for the next answer
        Throws:
        IOException