JmDNS 3.4.1

javax.jmdns.impl.tasks.state
Class Announcer

java.lang.Object
  extended by java.util.TimerTask
      extended by javax.jmdns.impl.tasks.DNSTask
          extended by javax.jmdns.impl.tasks.state.DNSStateTask
              extended by javax.jmdns.impl.tasks.state.Announcer
All Implemented Interfaces:
Runnable

public class Announcer
extends DNSStateTask

The Announcer sends an accumulated query of all announces, and advances the state of all serviceInfos, for which it has sent an announce. The Announcer also sends announcements and advances the state of JmDNS itself.

When the announcer has run two times, it finishes.


Constructor Summary
Announcer(JmDNSImpl jmDNSImpl)
           
 
Method Summary
protected  void advanceTask()
           
protected  DNSOutgoing buildOutgoingForDNS(DNSOutgoing out)
           
protected  DNSOutgoing buildOutgoingForInfo(ServiceInfoImpl info, DNSOutgoing out)
           
 boolean cancel()
           
protected  boolean checkRunCondition()
           
protected  DNSOutgoing createOugoing()
           
 String getName()
          Return this task name.
 String getTaskDescription()
           
protected  void recoverTask(Throwable e)
           
 void start(Timer timer)
          Start this task.
 String toString()
           
 
Methods inherited from class javax.jmdns.impl.tasks.state.DNSStateTask
advanceObjectsState, associate, defaultTTL, getTaskState, getTTL, removeAssociation, run, setDefaultTTL, setTaskState
 
Methods inherited from class javax.jmdns.impl.tasks.DNSTask
addAdditionalAnswer, addAnswer, addAnswer, addAuthoritativeAnswer, addQuestion, getDns
 
Methods inherited from class java.util.TimerTask
scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Announcer

public Announcer(JmDNSImpl jmDNSImpl)
Method Detail

getName

public String getName()
Description copied from class: DNSTask
Return this task name.

Specified by:
getName in class DNSTask
Returns:
task name

toString

public String toString()
Overrides:
toString in class DNSTask

start

public void start(Timer timer)
Description copied from class: DNSTask
Start this task.

Specified by:
start in class DNSTask
Parameters:
timer - task timer.

cancel

public boolean cancel()
Overrides:
cancel in class TimerTask

getTaskDescription

public String getTaskDescription()
Specified by:
getTaskDescription in class DNSStateTask

checkRunCondition

protected boolean checkRunCondition()
Specified by:
checkRunCondition in class DNSStateTask

createOugoing

protected DNSOutgoing createOugoing()
Specified by:
createOugoing in class DNSStateTask

buildOutgoingForDNS

protected DNSOutgoing buildOutgoingForDNS(DNSOutgoing out)
                                   throws IOException
Specified by:
buildOutgoingForDNS in class DNSStateTask
Throws:
IOException

buildOutgoingForInfo

protected DNSOutgoing buildOutgoingForInfo(ServiceInfoImpl info,
                                           DNSOutgoing out)
                                    throws IOException
Specified by:
buildOutgoingForInfo in class DNSStateTask
Throws:
IOException

recoverTask

protected void recoverTask(Throwable e)
Specified by:
recoverTask in class DNSStateTask

advanceTask

protected void advanceTask()
Specified by:
advanceTask in class DNSStateTask

Last updated 2011-08-25 12:40

Copyright © 2002-2011 JmDNS. All Rights Reserved.