java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.client.LookupDestJob
All Implemented Interfaces:
Job

class LookupDestJobextends JobImpl
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.
  • 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 context
      runner - the client connection requesting the lookup
      h - the destination hash to look up
      fromLocalDest - 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 against
      runner - the connection the resolved LeaseSet is handed to, or null if the caller only wants the lookup performed
      reqID - must be >= 0 if name != null
      timeout - how long to wait for the LeaseSet or the name lookup, in milliseconds; DEFAULT_TIMEOUT (15000) is used by the short constructor
      sessID - must non-null if reqID >= 0
      h - the destination hash to look up, mutually exclusive with name
      name - the base32 host name to resolve through the naming service, mutually exclusive with h
      fromLocalDest - use these tunnels for the lookup, or null for exploratory
  • Method Details

    • getName

      public String getName()
      Return the name.
      Returns:
      the descriptive name of the task
    • runJob

      public void runJob()
      Execute the job.