Package javax.jmdns.impl.tasks.state
Class Prober
- java.lang.Object
-
- java.util.TimerTask
-
- javax.jmdns.impl.tasks.DNSTask
-
- javax.jmdns.impl.tasks.state.DNSStateTask
-
- javax.jmdns.impl.tasks.state.Prober
-
- All Implemented Interfaces:
java.lang.Runnable
public class Prober extends DNSStateTask
The Prober sends three consecutive probes for all service infos that needs probing as well as for the host name. The state of each service info of the host name is advanced, when a probe has been sent for it. When the prober has run three times, it launches an Announcer. If a conflict during probes occurs, the affected service infos (and affected host name) are taken away from the prober. This eventually causes the prober to cancel itself.
-
-
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 void
advanceTask()
protected DNSOutgoing
buildOutgoingForDNS(DNSOutgoing out)
protected DNSOutgoing
buildOutgoingForInfo(ServiceInfoImpl info, DNSOutgoing out)
boolean
cancel()
protected boolean
checkRunCondition()
protected DNSOutgoing
createOugoing()
java.lang.String
getName()
Return this task name.java.lang.String
getTaskDescription()
protected void
recoverTask(java.lang.Throwable e)
void
start(java.util.Timer timer)
Start this task.java.lang.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
-
-
-
-
Constructor Detail
-
Prober
public Prober(JmDNSImpl jmDNSImpl)
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from class:DNSTask
Return this task name.
-
start
public void start(java.util.Timer timer)
Description copied from class:DNSTask
Start this task.
-
cancel
public boolean cancel()
- Overrides:
cancel
in classjava.util.TimerTask
-
getTaskDescription
public java.lang.String getTaskDescription()
- Specified by:
getTaskDescription
in classDNSStateTask
-
checkRunCondition
protected boolean checkRunCondition()
- Specified by:
checkRunCondition
in classDNSStateTask
-
createOugoing
protected DNSOutgoing createOugoing()
- Specified by:
createOugoing
in classDNSStateTask
-
buildOutgoingForDNS
protected DNSOutgoing buildOutgoingForDNS(DNSOutgoing out) throws java.io.IOException
- Specified by:
buildOutgoingForDNS
in classDNSStateTask
- Throws:
java.io.IOException
-
buildOutgoingForInfo
protected DNSOutgoing buildOutgoingForInfo(ServiceInfoImpl info, DNSOutgoing out) throws java.io.IOException
- Specified by:
buildOutgoingForInfo
in classDNSStateTask
- Throws:
java.io.IOException
-
recoverTask
protected void recoverTask(java.lang.Throwable e)
- Specified by:
recoverTask
in classDNSStateTask
-
advanceTask
protected void advanceTask()
- Specified by:
advanceTask
in classDNSStateTask
-
-