java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.message.OutboundClientMessageOneShotJob.DispatchJob
- All Implemented Interfaces:
Job
- Enclosing class:
OutboundClientMessageOneShotJob
Note: This is run inline by
OutboundClientMessageOneShotJob.send(), not on the job queue.Field Summary
FieldsModifier and TypeFieldDescriptionprivate final GarlicMessageThe message being sent.private final OutboundClientMessageOneShotJob.SendSuccessJobJob run when the reply arrives.private final OutboundClientMessageOneShotJob.SendTimeoutJobJob run when the reply times out.private final OutboundClientMessageOneShotJob.ReplySelectorSelector matching the reply.Constructor Summary
ConstructorsConstructorDescriptionDispatchJob(GarlicMessage msg, OutboundClientMessageOneShotJob.ReplySelector sel, OutboundClientMessageOneShotJob.SendSuccessJob success, OutboundClientMessageOneShotJob.SendTimeoutJob timeout) Create a dispatch job.Method Summary
All MethodsMethods inherited from class JobImpl
dropped, getContext, getJobId, getMadeReadyOn, getTiming, madeReady, requeue, toStringModifier and TypeMethodDescriptionvoiddropped()Default implementation does nothing.final RouterContextThe router context that this job belongs to.longgetJobId()The unique job ID for this job.longThe timestamp when this job was last made ready for execution.The timing object for this job.voidmadeReady(long now) For JobQueue only, not for external use.protected voidrequeue(long delayMs) Requeue this job to run after the specified delay.toString()
Field Details
_msg
The message being sent._selector
Selector matching the reply._replyFound
Job run when the reply arrives._replyTimeout
Job run when the reply times out.
Constructor Details
DispatchJob
public DispatchJob(GarlicMessage msg, OutboundClientMessageOneShotJob.ReplySelector sel, OutboundClientMessageOneShotJob.SendSuccessJob success, OutboundClientMessageOneShotJob.SendTimeoutJob timeout) Create a dispatch job.- Parameters:
msg- the garlic message to dispatch to the reply selectorsel- may be nullsuccess- non-null if sel non-nulltimeout- non-null if sel non-null
Method Details
getName
runJob
public void runJob()Description copied from interface:JobActually perform the task. This call blocks until the Job is complete.