net.i2p.router.message
Class BuildTestMessageJob

java.lang.Object
  extended by net.i2p.router.JobImpl
      extended by 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.


Constructor Summary
BuildTestMessageJob(RouterContext ctx, RouterInfo target, Hash replyTo, Job onSendJob, Job onSendFailedJob, long timeoutMs, int priority)
           
 
Method Summary
 java.lang.String getName()
          Descriptive name of the task
 void runJob()
          Actually perform the task.
 
Methods inherited from class net.i2p.router.JobImpl
dropped, getAddedBy, getContext, getJobId, getMadeReadyOn, getTiming, madeReady, requeue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BuildTestMessageJob

public BuildTestMessageJob(RouterContext ctx,
                           RouterInfo target,
                           Hash replyTo,
                           Job onSendJob,
                           Job onSendFailedJob,
                           long timeoutMs,
                           int priority)
Parameters:
target - router being tested
onSendJob - after the ping is successful
onSendFailedJob - after the ping fails or times out
timeoutMs - how long to wait before timing out
priority - how high priority to send this test
Method Detail

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.