java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.client.LookupDestJob
- All Implemented Interfaces:
Job
Look up the lease of a hash, to convert it to a Destination for the client. Or, since 0.9.11, lookup a host name in the naming service.
Field Summary
Constructor Summary
ConstructorsConstructorDescriptionLookupDestJob(RouterContext context, ClientConnectionRunner runner, long reqID, long timeout, SessionId sessID, Hash h, String name, Hash fromLocalDest) One of h or name non-null.LookupDestJob(RouterContext context, ClientConnectionRunner runner, Hash h, Hash fromLocalDest) Create a lookup job with the default timeout.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()
Constructor Details
LookupDestJob
public LookupDestJob(RouterContext context, ClientConnectionRunner runner, Hash h, Hash fromLocalDest) Create a lookup job with the default timeout.- Parameters:
context- the router contextrunner- the client connection requesting the lookuph- the destination hash to look upfromLocalDest- the local destination to send the reply to, or null
LookupDestJob
public LookupDestJob(RouterContext context, ClientConnectionRunner runner, long reqID, long timeout, SessionId sessID, Hash h, String name, Hash fromLocalDest) One of h or name non-null.For hash or b32 name, the dest will be returned if the LS can be found, even if the dest uses unsupported crypto.
- Parameters:
context- the router context the job runs againstrunner- the connection the resolved LeaseSet is handed to, or null if the caller only wants the lookup performedreqID- must be >= 0 if name != nulltimeout- how long to wait for the LeaseSet or the name lookup, in milliseconds; DEFAULT_TIMEOUT (15000) is used by the short constructorsessID- must non-null if reqID >= 0h- the destination hash to look up, mutually exclusive with namename- the base32 host name to resolve through the naming service, mutually exclusive with hfromLocalDest- use these tunnels for the lookup, or null for exploratory
Method Details
getName
runJob
public void runJob()Execute the job.