Package javax.jmdns.impl.tasks.state
Class Announcer
- java.lang.Object
-
- java.util.TimerTask
-
- javax.jmdns.impl.tasks.DNSTask
-
- javax.jmdns.impl.tasks.state.DNSStateTask
-
- javax.jmdns.impl.tasks.state.Announcer
-
- All Implemented Interfaces:
java.lang.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.
-
-
Field Summary
-
Fields inherited from class javax.jmdns.impl.tasks.state.DNSStateTask
logger
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidadvanceTask()protected DNSOutgoingbuildOutgoingForDNS(DNSOutgoing out)protected DNSOutgoingbuildOutgoingForInfo(ServiceInfoImpl info, DNSOutgoing out)booleancancel()protected booleancheckRunCondition()protected DNSOutgoingcreateOugoing()java.lang.StringgetName()Return this task name.java.lang.StringgetTaskDescription()protected voidrecoverTask(java.lang.Throwable e)voidstart(java.util.Timer timer)Start this task.java.lang.StringtoString()-
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
-
-
-
-
Constructor Detail
-
Announcer
public Announcer(JmDNSImpl jmDNSImpl)
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from class:DNSTaskReturn this task name.
-
start
public void start(java.util.Timer timer)
Description copied from class:DNSTaskStart this task.
-
cancel
public boolean cancel()
- Overrides:
cancelin classjava.util.TimerTask
-
getTaskDescription
public java.lang.String getTaskDescription()
- Specified by:
getTaskDescriptionin classDNSStateTask
-
checkRunCondition
protected boolean checkRunCondition()
- Specified by:
checkRunConditionin classDNSStateTask
-
createOugoing
protected DNSOutgoing createOugoing()
- Specified by:
createOugoingin classDNSStateTask
-
buildOutgoingForDNS
protected DNSOutgoing buildOutgoingForDNS(DNSOutgoing out) throws java.io.IOException
- Specified by:
buildOutgoingForDNSin classDNSStateTask- Throws:
java.io.IOException
-
buildOutgoingForInfo
protected DNSOutgoing buildOutgoingForInfo(ServiceInfoImpl info, DNSOutgoing out) throws java.io.IOException
- Specified by:
buildOutgoingForInfoin classDNSStateTask- Throws:
java.io.IOException
-
recoverTask
protected void recoverTask(java.lang.Throwable e)
- Specified by:
recoverTaskin classDNSStateTask
-
advanceTask
protected void advanceTask()
- Specified by:
advanceTaskin classDNSStateTask
-
-