java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.message.OutboundClientMessageOneShotJob.SendSuccessJob
- Direct Known Subclasses:
OutboundClientMessageOneShotJob.ECIESReplyCallback
- Enclosing class:
OutboundClientMessageOneShotJob
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LeaseSetLease set the message was delivered to.private final SessionKeyKey for decrypting the reply.private final OutboundClientMessageOneShotJob.SendTimeoutJobJob to cancel when the reply arrives.private final TagSetHandleTags the reply was encrypted with.Constructor Summary
ConstructorsConstructorDescriptionSendSuccessJob(SessionKey key, TagSetHandle tags, LeaseSet ls, OutboundClientMessageOneShotJob.SendTimeoutJob timeout) Create a new success job that will be fired when the message encrypted with the given session key and bearing the specified tags are confirmed delivered.Method Summary
All MethodsModifier and TypeMethodDescriptiongetName()Descriptive name of the task.voidrunJob()May be run after SendTimeoutJob, will re-add the tags.voidsetMessage(I2NPMessage msg) Called byInNetMessagePoolwhen an I2NPMessage matching a MessageSelector registered with the OutboundMessageRegistry is received.Methods 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
_key
Key for decrypting the reply._tags
Tags the reply was encrypted with._deliveredLS
Lease set the message was delivered to._replyTimeout
Job to cancel when the reply arrives.
Constructor Details
SendSuccessJob
public SendSuccessJob(SessionKey key, TagSetHandle tags, LeaseSet ls, OutboundClientMessageOneShotJob.SendTimeoutJob timeout) Create a new success job that will be fired when the message encrypted with the given session key and bearing the specified tags are confirmed delivered. This is only instantiated if we are expecting a reply.- Parameters:
key- may be nulltags- may be nullls- the delivered leaseset or nulltimeout- will be cancelled when this is run, may be null
Method Details
getName
runJob
setMessage
Description copied from interface:ReplyJobCalled byInNetMessagePoolwhen an I2NPMessage matching a MessageSelector registered with the OutboundMessageRegistry is received.- Specified by:
setMessagein interfaceReplyJob- Parameters:
msg- the received I2NP message