DNSResolverTask
Date: 2017-02-10

javax.jmdns.impl.tasks.resolver

## Class DNSResolverTask

- java.lang.Object
- - java.util.TimerTask
  - - javax.jmdns.impl.tasks.DNSTask
    - - javax.jmdns.impl.tasks.resolver.DNSResolverTask

- All Implemented Interfaces:
    java.lang.Runnable
  Direct Known Subclasses:
    ServiceInfoResolver, ServiceResolver, TypeResolver

      public abstract class DNSResolverTask
      extends DNSTask

  This is the root class for all resolver tasks.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `_count` Counts the number of queries being sent.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DNSResolverTask(JmDNSImpl jmDNSImpl)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract DNSOutgoing` | `addAnswers(DNSOutgoing out)` Overridden by subclasses to add questions to the message. Note: Because of message size limitation the returned message may be different than the message parameter.
    `protected abstract DNSOutgoing` | `addQuestions(DNSOutgoing out)` Overridden by subclasses to add questions to the message. Note: Because of message size limitation the returned message may be different than the message parameter.
    `protected abstract java.lang.String` | `description()` Returns a description of the resolver for debugging
    `void` | `run()`
    `void` | `start(java.util.Timer timer)` Start this task.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class javax.jmdns.impl.tasks.DNSTask

      `addAdditionalAnswer, addAnswer, addAnswer, addAuthoritativeAnswer, addQuestion, getDns, getName`

    - ### Methods inherited from class java.util.TimerTask

      `cancel, scheduledExecutionTime`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### _count

          protected int _count

      Counts the number of queries being sent.

  - ### Constructor Detail

    - #### DNSResolverTask

          public DNSResolverTask(JmDNSImpl jmDNSImpl)

      Parameters:
        `jmDNSImpl` -

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `DNSTask`

    - #### start

          public void start(java.util.Timer timer)

      Description copied from class: `DNSTask`
      Start this task.
      Specified by:
        `start` in class `DNSTask`
      Parameters:
        `timer` - task timer.

    - #### run

          public void run()

      Specified by:
        `run` in interface `java.lang.Runnable`
      Specified by:
        `run` in class `java.util.TimerTask`

    - #### addQuestions

          protected abstract DNSOutgoing addQuestions(DNSOutgoing out)
                                               throws java.io.IOException

      Overridden by subclasses to add questions to the message.
      Note: Because of message size limitation the returned message may be different than the message parameter.
      Parameters:
        `out` - outgoing message
      Returns:
        the outgoing message.
      Throws:
        `java.io.IOException`

    - #### addAnswers

          protected abstract DNSOutgoing addAnswers(DNSOutgoing out)
                                             throws java.io.IOException

      Overridden by subclasses to add questions to the message.
      Note: Because of message size limitation the returned message may be different than the message parameter.
      Parameters:
        `out` - outgoing message
      Returns:
        the outgoing message.
      Throws:
        `java.io.IOException`

    - #### description

          protected abstract java.lang.String description()

      Returns a description of the resolver for debugging
      Returns:
        resolver description