net.i2p.router.message
Class BuildTestMessageJob
java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.message.BuildTestMessageJob
- All Implemented Interfaces:
- Job
public class BuildTestMessageJob
- extends JobImpl
Build a test message that will be sent to the target to make sure they're alive.
Once that is verified, onSendJob is enqueued. If their reachability isn't
known (or they're unreachable) within timeoutMs, onSendFailedJob is enqueued.
The test message is sent at the specified priority.
Method Summary |
java.lang.String |
getName()
Descriptive name of the task |
void |
runJob()
Actually perform the task. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BuildTestMessageJob
public BuildTestMessageJob(RouterContext ctx,
RouterInfo target,
Hash replyTo,
Job onSendJob,
Job onSendFailedJob,
long timeoutMs,
int priority)
- Parameters:
target
- router being testedonSendJob
- after the ping is successfulonSendFailedJob
- after the ping fails or times outtimeoutMs
- how long to wait before timing outpriority
- how high priority to send this test
getName
public java.lang.String getName()
- Description copied from interface:
Job
- Descriptive name of the task
runJob
public void runJob()
- Description copied from interface:
Job
- Actually perform the task. This call blocks until the Job is complete.