public abstract class DNSStateTask extends DNSTask
DNSStatefulObject
interface and therefore participate in the state machine.Constructor and Description |
---|
DNSStateTask(JmDNSImpl jmDNSImpl,
int ttl) |
Modifier and Type | Method and Description |
---|---|
protected void |
advanceObjectsState(List<DNSStatefulObject> list) |
protected abstract void |
advanceTask() |
protected void |
associate(DNSState state)
Associate the DNS host and the service infos with this task if not already associated and in the same state.
|
protected abstract DNSOutgoing |
buildOutgoingForDNS(DNSOutgoing out) |
protected abstract DNSOutgoing |
buildOutgoingForInfo(ServiceInfoImpl info,
DNSOutgoing out) |
protected abstract boolean |
checkRunCondition() |
protected abstract DNSOutgoing |
createOugoing() |
static int |
defaultTTL() |
abstract String |
getTaskDescription() |
protected DNSState |
getTaskState() |
int |
getTTL() |
protected abstract void |
recoverTask(Throwable e) |
protected void |
removeAssociation()
Remove the DNS host and service info association with this task.
|
void |
run() |
static void |
setDefaultTTL(int value)
For testing only do not use in production.
|
protected void |
setTaskState(DNSState taskState) |
addAdditionalAnswer, addAnswer, addAnswer, addAuthoritativeAnswer, addQuestion, getDns, getName, start, toString
cancel, scheduledExecutionTime
public DNSStateTask(JmDNSImpl jmDNSImpl, int ttl)
jmDNSImpl
- ttl
- public abstract String getTaskDescription()
public static int defaultTTL()
public static void setDefaultTTL(int value)
value
- public int getTTL()
protected void associate(DNSState state)
state
- target stateprotected void removeAssociation()
protected abstract boolean checkRunCondition()
protected abstract DNSOutgoing buildOutgoingForDNS(DNSOutgoing out) throws IOException
IOException
protected abstract DNSOutgoing buildOutgoingForInfo(ServiceInfoImpl info, DNSOutgoing out) throws IOException
IOException
protected abstract DNSOutgoing createOugoing()
protected void advanceObjectsState(List<DNSStatefulObject> list)
protected abstract void recoverTask(Throwable e)
protected abstract void advanceTask()
protected DNSState getTaskState()
protected void setTaskState(DNSState taskState)
taskState
- the taskState to setCopyright © 2002–2016 JmDNS. All rights reserved.