Class ServiceResolver

  • All Implemented Interfaces:
    java.lang.Runnable

    public class ServiceResolver
    extends DNSResolverTask
    The ServiceResolver queries three times consecutively for services of a given type, and then removes itself from the timer.

    The ServiceResolver will run only if JmDNS is in state ANNOUNCED. REMIND: Prevent having multiple service resolvers for the same type in the timer queue.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String _type  
    • Constructor Summary

      Constructors 
      Constructor Description
      ServiceResolver​(JmDNSImpl jmDNSImpl, java.lang.String type)  
    • Field Detail

      • _type

        private final java.lang.String _type
    • Constructor Detail

      • ServiceResolver

        public ServiceResolver​(JmDNSImpl jmDNSImpl,
                               java.lang.String type)
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from class: DNSTask
        Return this task name.
        Specified by:
        getName in class DNSTask
        Returns:
        task name
      • addAnswers

        protected DNSOutgoing addAnswers​(DNSOutgoing out)
                                  throws java.io.IOException
        Description copied from class: DNSResolverTask
        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.
        Specified by:
        addAnswers in class DNSResolverTask
        Parameters:
        out - outgoing message
        Returns:
        the outgoing message.
        Throws:
        java.io.IOException
      • addQuestions

        protected DNSOutgoing addQuestions​(DNSOutgoing out)
                                    throws java.io.IOException
        Description copied from class: DNSResolverTask
        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.
        Specified by:
        addQuestions in class DNSResolverTask
        Parameters:
        out - outgoing message
        Returns:
        the outgoing message.
        Throws:
        java.io.IOException
      • description

        protected java.lang.String description()
        Description copied from class: DNSResolverTask
        Returns a description of the resolver for debugging
        Specified by:
        description in class DNSResolverTask
        Returns:
        resolver description