## Uses of Interface
net.i2p.router.Job

- Packages that use Job
  Package | Description
  --- | ---
  net.i2p.router | The I2P router application handles I2P network communication.
  net.i2p.router.client | Router-side implementation of the I2CP (I2P Client Protocol) interface for application integration.
  net.i2p.router.dummy | Dummy implementations and stub classes for testing purposes.
  net.i2p.router.message | Garlic message creation, parsing, and source routing for I2P communications.
  net.i2p.router.networkdb | Network database management and coordination for the I2P distributed hash table.
  net.i2p.router.networkdb.kademlia | Kademlia DHT implementation and floodfill router functionality for I2P.
  net.i2p.router.peermanager | Peer management, profiling, and capacity calculation for I2P network optimization.
  net.i2p.router.startup | The I2P startup package loads configuration when I2P is started.
  net.i2p.router.sybil | Offline analysis tools for detecting Sybil attacks and malicious peer coordination in the I2P network.
  net.i2p.router.tasks | Periodic maintenance tasks and background jobs for I2P router operations.
  net.i2p.router.transport | Transport layer implementations and management for I2P network communication.
  net.i2p.router.tunnel.pool | Tunnel pool management, creation, and peer selection for I2P's anonymous routing system.
  net.i2p.router.web.helpers | Helpers and handlers for the router console user interface, with these classes supporting the webapp in routerconsole.war.

- - ### Uses of Job in net.i2p.router

    Subinterfaces of Job in net.i2p.router
    Modifier and Type | Interface and Description
    --- | ---
    `interface` | `ReplyJob` Defines an executable task that can be fired off in reply to a message

    Classes in net.i2p.router that implement Job
    Modifier and Type | Class and Description
    --- | ---
    `class` | `JobImpl` Base implementation of a Job For use by the router only.

    Methods in net.i2p.router that return Job
    Modifier and Type | Method and Description
    --- | ---
    `Job` | HandlerJobBuilder.`createJob(I2NPMessage receivedMessage, RouterIdentity from, Hash fromHash)` Create a new job to handle the received message.
    `Job` | JobQueueRunner.`getCurrentJob()`
    `Job` | JobQueueRunner.`getLastJob()`
    `Job` | JobQueue.`getLastJob()` Get the last job that was executed.
    `(package private) Job` | JobQueue.`getNext()`
    `Job` | OutNetMessage.`getOnFailedReplyJob()` If the Message selector is specified but it doesn't find a reply before its expiration passes, this job is enqueued.
    `Job` | OutNetMessage.`getOnFailedSendJob()` If the router could not be reached or the expiration passed, this job is enqueued.
    `Job` | OutNetMessage.`getOnSendJob()` After the message is successfully passed to the router specified, the given job is enqueued.

    Methods in net.i2p.router with parameters of type Job
    Modifier and Type | Method and Description
    --- | ---
    `void` | JobQueue.`addJob(Job job)` Enqueue the specified job for normal processing.
    `void` | JobQueue.`addJobToTop(Job job)` Enqueue the specified job to be processed at the top of the queue.
    `abstract void` | NetworkDatabaseFacade.`lookupDestination(Hash key, Job onFinishedJob, long timeoutMs, Hash fromLocalDest)` Lookup using the client's tunnels Succeeds even if LS validation fails due to unsupported sig type
    `abstract void` | NetworkDatabaseFacade.`lookupLeaseSet(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs)`
    `abstract void` | NetworkDatabaseFacade.`lookupLeaseSet(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, Hash fromLocalDest)` Lookup using the client's tunnels
    `abstract void` | NetworkDatabaseFacade.`lookupLeaseSetRemotely(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, Hash fromLocalDest)` Unconditionally lookup using the client's tunnels.
    `abstract void` | NetworkDatabaseFacade.`lookupRouterInfo(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs)`
    `void` | JobQueue.`removeJob(Job job)` Remove a job from the job queue.
    `abstract void` | ClientManagerFacade.`requestLeaseSet(Destination dest, LeaseSet set, long timeout, Job onCreateJob, Job onFailedJob)` Request that a particular client authorize the Leases contained in the LeaseSet, after which the onCreateJob is queued up.
    `void` | OutNetMessage.`setOnFailedReplyJob(Job job)`
    `void` | OutNetMessage.`setOnFailedSendJob(Job job)`
    `void` | OutNetMessage.`setOnSendJob(Job job)`
    `(package private) void` | JobQueue.`updateStats(Job job, long doStart, long origStartAfter, long duration)`

    Method parameters in net.i2p.router with type arguments of type Job
    Modifier and Type | Method and Description
    --- | ---
    `int` | JobQueue.`getJobs(Collection<Job> readyJobs, Collection<Job> timedJobs, Collection<Job> activeJobs, Collection<Job> justFinishedJobs)` Collect statistics about jobs currently in the queue.
    `int` | JobQueue.`getJobs(Collection<Job> readyJobs, Collection<Job> timedJobs, Collection<Job> activeJobs, Collection<Job> justFinishedJobs)` Collect statistics about jobs currently in the queue.
    `int` | JobQueue.`getJobs(Collection<Job> readyJobs, Collection<Job> timedJobs, Collection<Job> activeJobs, Collection<Job> justFinishedJobs)` Collect statistics about jobs currently in the queue.
    `int` | JobQueue.`getJobs(Collection<Job> readyJobs, Collection<Job> timedJobs, Collection<Job> activeJobs, Collection<Job> justFinishedJobs)` Collect statistics about jobs currently in the queue.

  - ### Uses of Job in net.i2p.router.client

    Classes in net.i2p.router.client that implement Job
    Modifier and Type | Class and Description
    --- | ---
    `(package private) class` | `CreateSessionJob` Given an established connection, walk through the process of establishing the leaseset.
    `(package private) class` | `LookupDestJob` Look up the lease of a hash, to convert it to a Destination for the client.
    `(package private) class` | `MessageReceivedJob` Async job to notify the client that a new message is available for them, or just send it directly if specified.
    `(package private) class` | `ReportAbuseJob` Async job to send an abuse message to the client
    `(package private) class` | `RequestLeaseSetJob` Async job to walk the client through generating a lease set.

    Methods in net.i2p.router.client that return Job
    Modifier and Type | Method and Description
    --- | ---
    `Job` | LeaseRequestState.`getOnFailed()` what to do if the lease set create fails / times out
    `Job` | LeaseRequestState.`getOnGranted()` what to do once the lease set is created

    Methods in net.i2p.router.client with parameters of type Job
    Modifier and Type | Method and Description
    --- | ---
    `void` | ClientManager.`requestLeaseSet(Destination dest, LeaseSet set, long timeout, Job onCreateJob, Job onFailedJob)` Request that a particular client authorize the Leases contained in the LeaseSet, after which the onCreateJob is queued up.
    `void` | ClientManagerFacadeImpl.`requestLeaseSet(Destination dest, LeaseSet set, long timeout, Job onCreateJob, Job onFailedJob)` Request that a particular client authorize the Leases contained in the LeaseSet, after which the onCreateJob is queued up.
    `(package private) void` | ClientConnectionRunner.`requestLeaseSet(Hash h, LeaseSet set, long expirationTime, Job onCreateJob, Job onFailedJob)` Request that a particular client authorize the Leases contained in the LeaseSet, after which the onCreateJob is queued up.

    Constructors in net.i2p.router.client with parameters of type Job
    Constructor and Description
    `LeaseRequestState(Job onGranted, Job onFailed, long currentEarliestLeastDate, long expiration, LeaseSet requested)`

  - ### Uses of Job in net.i2p.router.dummy

    Methods in net.i2p.router.dummy with parameters of type Job
    Modifier and Type | Method and Description
    --- | ---
    `void` | DummyNetworkDatabaseFacade.`lookupDestination(Hash key, Job onFinishedJob, long timeoutMs, Hash fromLocalDest)`
    `void` | DummyNetworkDatabaseFacade.`lookupLeaseSet(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs)`
    `void` | DummyNetworkDatabaseFacade.`lookupLeaseSet(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, Hash fromLocalDest)`
    `void` | DummyNetworkDatabaseFacade.`lookupLeaseSetRemotely(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, Hash fromLocalDest)`
    `void` | DummyNetworkDatabaseFacade.`lookupRouterInfo(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs)`
    `void` | DummyClientManagerFacade.`requestLeaseSet(Destination dest, LeaseSet set, long timeout, Job onCreateJob, Job onFailedJob)`

  - ### Uses of Job in net.i2p.router.message

    Classes in net.i2p.router.message that implement Job
    Modifier and Type | Class and Description
    --- | ---
    `class` | `HandleGarlicMessageJob` Job to handle an inbound GarlicMessage received outside of a tunnel.
    `class` | `OutboundClientMessageOneShotJob` Send a client message out an outbound tunnel and into an inbound tunnel on the target leaseSet.
    `class` | `SendMessageDirectJob` Send a message directly to another router, i.e.

    Methods in net.i2p.router.message that return Job
    Modifier and Type | Method and Description
    --- | ---
    `Job` | GarlicMessageHandler.`createJob(I2NPMessage receivedMessage, RouterIdentity from, Hash fromHash)`

    Constructors in net.i2p.router.message with parameters of type Job
    Constructor and Description
    `SendMessageDirectJob(RouterContext ctx, I2NPMessage message, Hash toPeer, Job onSend, ReplyJob onSuccess, Job onFail, MessageSelector selector, int timeoutMs, int priority, long msgIDBloomXor)`
    `SendMessageDirectJob(RouterContext ctx, I2NPMessage message, Hash toPeer, ReplyJob onSuccess, Job onFail, MessageSelector selector, int timeoutMs, int priority)`
    `SendMessageDirectJob(RouterContext ctx, I2NPMessage message, Hash toPeer, ReplyJob onSuccess, Job onFail, MessageSelector selector, int timeoutMs, int priority, long msgIDBloomXor)`

  - ### Uses of Job in net.i2p.router.networkdb

    Classes in net.i2p.router.networkdb that implement Job
    Modifier and Type | Class and Description
    --- | ---
    `class` | `HandleDatabaseLookupMessageJob` Handle a lookup for a key received from a remote peer.
    `class` | `PublishLocalRouterInfoJob` Publish the local router's RouterInfo periodically.

  - ### Uses of Job in net.i2p.router.networkdb.kademlia

    Classes in net.i2p.router.networkdb.kademlia that implement Job
    Modifier and Type | Class and Description
    --- | ---
    `(package private) class` | `DirectLookupJob` Ask a connected peer for his RI.
    `(package private) class` | `DirectLookupMatchJob` Override to not call failed() in setMessage(), as it will be called from runJob()
    `(package private) class` | `ExpireLeasesJob` Periodically searches through all leases to find expired ones, failing those keys and firing up a new search for each (in case we want it later, might as well preemptively fetch it).
    `(package private) class` | `ExpireRoutersJob` Go through the routing table pick routers that are out of date, but don't expire routers we're actively connected to.
    `class` | `ExploreJob` Represents an exploratory search job for a particular key in the Kademlia network database.
    `(package private) class` | `FloodfillMonitorJob` Simple job to monitor the floodfill pool.
    `(package private) class` | `FloodfillRouterInfoFloodJob` Job to flood nearby floodfill routers with our RI.
    `(package private) class` | `FloodfillStoreJob` This class extends StoreJob to fire off a FloodfillVerifyStoreJob after a successful store.
    `(package private) class` | `FloodfillVerifyStoreJob` Send a netDb lookup to a floodfill peer - If it is found, great, but if they reply back saying they don't know it, queue up a store of the key to a random floodfill peer again (via FloodfillStoreJob)
    `(package private) class` | `FloodOnlyLookupMatchJob` Handles match processing for flood-only search operations.
    `(package private) class` | `FloodOnlyLookupTimeoutJob` Timeout handler for flood-only search operations.
    `(package private) class` | `FloodOnlySearchJob` Flood-only search implementation for network database lookups.
    `(package private) class` | `FloodSearchJob` Base class for flood-based search operations with fallback to Kademlia.
    `class` | `HandleFloodfillDatabaseLookupMessageJob` Processes database lookup messages received by floodfill routers.
    `(package private) class` | `HandleFloodfillDatabaseStoreMessageJob` Processes and stores DatabaseStoreMessage data in the floodfill network database.
    `(package private) class` | `IterativeFollowupJob` Performs targeted followup lookups during iterative search operations.
    `(package private) class` | `IterativeLookupJob` Processes DatabaseSearchReplyMessage responses during iterative searches.
    `class` | `IterativeSearchJob` Traditional Kademlia iterative search with enhanced robustness.
    `(package private) class` | `IterativeTimeoutJob` Handles timeout events for individual peer lookups in iterative searches.
    `(package private) class` | `RefreshRoutersJob` RefreshRoutersJob performs router info refresh operations periodically.
    `class` | `RepublishLeaseSetJob` A job that periodically republishes a local LeaseSet to the network database.
    `(package private) class` | `SearchJob` Base class for iterative network database search operations.
    `protected class` | `SearchJob.FailedJob` Called when a particular peer failed to respond before the timeout was reached, or if the peer could not be contacted at all.
    `(package private) class` | `SearchReplyJob` Processes DatabaseSearchReplyMessage responses from floodfill peers.
    `(package private) class` | `SearchUpdateReplyFoundJob` Called after a match to a db search is found Used only by SearchJob which is only used by ExploreJob
    `(package private) class` | `SingleLookupJob` Performs targeted followup lookups for RouterInfo entries from search replies.
    `(package private) class` | `SingleSearchJob` Performs a targeted lookup to a single peer for a specific key.
    `(package private) class` | `StartExplorersJob` This job initiates exploration of the network database by selecting keys to explore and queuing ExploreJobs up to a maximum per run.
    `(package private) class` | `StoreJob` Abstract base class for network database store operations.

    Fields in net.i2p.router.networkdb.kademlia declared as Job
    Modifier and Type | Field and Description
    --- | ---
    `protected Job` | FloodOnlySearchJob.`_onTimeout`

    Fields in net.i2p.router.networkdb.kademlia with type parameters of type Job
    Modifier and Type | Field and Description
    --- | ---
    `protected List<Job>` | FloodSearchJob.`_onFailed`
    `protected List<Job>` | FloodSearchJob.`_onFind`

    Methods in net.i2p.router.networkdb.kademlia that return Job
    Modifier and Type | Method and Description
    --- | ---
    `Job` | FloodfillDatabaseStoreMessageHandler.`createJob(I2NPMessage receivedMessage, RouterIdentity from, Hash fromHash)`
    `Job` | FloodfillDatabaseLookupMessageHandler.`createJob(I2NPMessage receivedMessage, RouterIdentity from, Hash fromHash)` Creates a job to handle an incoming DatabaseLookupMessage, or returns null if the lookup should be dropped.

    Methods in net.i2p.router.networkdb.kademlia with parameters of type Job
    Modifier and Type | Method and Description
    --- | ---
    `(package private) void` | FloodSearchJob.`addDeferred(Job onFind, Job onFailed, long timeoutMs, boolean isLease)` Add jobs to an existing search
    `int` | SearchJob.`addDeferred(Job onFind, Job onFail, long expiration, boolean isLease)`
    `void` | KademliaNetworkDatabaseFacade.`lookupDestination(Hash key, Job onFinishedJob, long timeoutMs, Hash fromLocalDest)` Lookup using the client's tunnels Succeeds even if LS validation and store fails due to unsupported sig type, expired, etc.
    `void` | KademliaNetworkDatabaseFacade.`lookupLeaseSet(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs)` Lookup using exploratory tunnels.
    `void` | KademliaNetworkDatabaseFacade.`lookupLeaseSet(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, Hash fromLocalDest)` Lookup using the client's tunnels Use lookupDestination() if you don't need the LS or don't need it validated.
    `void` | KademliaNetworkDatabaseFacade.`lookupLeaseSetRemotely(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, Hash fromLocalDest)` Unconditionally lookup using the client's tunnels.
    `void` | KademliaNetworkDatabaseFacade.`lookupRouterInfo(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs)`
    `(package private) SearchJob` | FloodfillNetworkDatabaseFacade.`search(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, boolean isLease)` Lookup using exploratory tunnels.
    `(package private) SearchJob` | KademliaNetworkDatabaseFacade.`search(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, boolean isLease)` Begin a kademlia style search for the key specified, which can take up to timeoutMs and will fire the appropriate jobs on success or timeout (or if the kademlia search completes without any match) Unused - called only by FNDF.searchFull() from FloodSearchJob which is overridden - don't use this.
    `(package private) SearchJob` | FloodfillNetworkDatabaseFacade.`search(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, boolean isLease, Hash fromLocalDest)` Lookup using the client's tunnels.
    `(package private) SearchJob` | KademliaNetworkDatabaseFacade.`search(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, boolean isLease, Hash fromLocalDest)` Unused - see FNDF
    `(package private) void` | FloodfillNetworkDatabaseFacade.`sendStore(Hash key, DatabaseEntry ds, Job onSuccess, Job onFailure, long sendTimeout, Set<Hash> toIgnore)`
    `(package private) abstract void` | KademliaNetworkDatabaseFacade.`sendStore(Hash key, DatabaseEntry ds, Job onSuccess, Job onFailure, long sendTimeout, Set<Hash> toIgnore)` See implementation in FNDF

    Constructors in net.i2p.router.networkdb.kademlia with parameters of type Job
    Constructor and Description
    `DirectLookupJob(RouterContext ctx, FloodfillNetworkDatabaseFacade facade, Hash peer, RouterInfo oldRI, Job onFind, Job onFail)`
    `FloodfillStoreJob(RouterContext context, FloodfillNetworkDatabaseFacade facade, Hash key, DatabaseEntry data, Job onSuccess, Job onFailure, long timeoutMs)` Create a new FloodfillStoreJob to send data to floodfills.
    `FloodfillStoreJob(RouterContext context, FloodfillNetworkDatabaseFacade facade, Hash key, DatabaseEntry data, Job onSuccess, Job onFailure, long timeoutMs, Set<Hash> toSkip)` Create a new FloodfillStoreJob to send data to floodfills.
    `FloodOnlySearchJob(RouterContext ctx, FloodfillNetworkDatabaseFacade facade, Hash key, Job onFind, Job onFailed, int timeoutMs)` For DirectLookupJob extension, RI only, different match job
    `FloodOnlySearchJob(RouterContext ctx, FloodfillNetworkDatabaseFacade facade, Hash key, Job onFind, Job onFailed, int timeoutMs, boolean isLease)`
    `FloodSearchJob(RouterContext ctx, FloodfillNetworkDatabaseFacade facade, Hash key, Job onFind, Job onFailed, int timeoutMs, boolean isLease)`
    `IterativeSearchJob(RouterContext ctx, FloodfillNetworkDatabaseFacade facade, Hash key, Job onFind, Job onFailed, int timeoutMs, boolean isLease)` Lookup using exploratory tunnels
    `IterativeSearchJob(RouterContext ctx, FloodfillNetworkDatabaseFacade facade, Hash key, Job onFind, Job onFailed, int timeoutMs, boolean isLease, Hash fromLocalDest)` Lookup using the client's tunnels.
    `SearchJob(RouterContext context, KademliaNetworkDatabaseFacade facade, Hash key, Job onSuccess, Job onFailure, long timeoutMs, boolean keepStats, boolean isLease, long msgIDBloomXor)` Create a new search for the routingKey specified
    `StoreJob(RouterContext context, KademliaNetworkDatabaseFacade facade, Hash key, DatabaseEntry data, Job onSuccess, Job onFailure, long timeoutMs)` Send a data structure to the floodfills
    `StoreJob(RouterContext context, KademliaNetworkDatabaseFacade facade, Hash key, DatabaseEntry data, Job onSuccess, Job onFailure, long timeoutMs, Set<Hash> toSkip)`

  - ### Uses of Job in net.i2p.router.peermanager

    Classes in net.i2p.router.peermanager that implement Job
    Modifier and Type | Class and Description
    --- | ---
    `class` | `PeerTestJob` Grab some peers that we want to test and probe them briefly to get some more accurate and up to date performance data.

  - ### Uses of Job in net.i2p.router.startup

    Classes in net.i2p.router.startup that implement Job
    Modifier and Type | Class and Description
    --- | ---
    `(package private) class` | `BootCommSystemJob` This actually boots almost everything
    `(package private) class` | `BootNetworkDbJob` start up the network database
    `(package private) class` | `BootPeerManagerJob` start up the peer manager
    `(package private) class` | `BuildTrustedLinksJob` For future restricted routes.
    `class` | `CreateRouterInfoJob` Warning - misnamed.
    `class` | `LoadClientAppsJob` Run any client applications specified in clients.config.
    `(package private) class` | `LoadRouterInfoJob` Run once or twice at startup by StartupJob, and then runs BootCommSystemJob
    `(package private) class` | `RebuildRouterInfoJob` This used be called from StartAcceptingClientsJob but is now disabled.
    `(package private) class` | `StartAcceptingClientsJob` start I2CP interface
    `class` | `StartupJob` The StartupJob should be run once on router startup to initialize the system and set things in motion.

    Constructors in net.i2p.router.startup with parameters of type Job
    Constructor and Description
    `BuildTrustedLinksJob(RouterContext context, Job next)`
    `CreateRouterInfoJob(RouterContext ctx, Job next)`

  - ### Uses of Job in net.i2p.router.sybil

    Classes in net.i2p.router.sybil that implement Job
    Modifier and Type | Class and Description
    --- | ---
    `class` | `Analysis` Sybil attack analysis implementation.

  - ### Uses of Job in net.i2p.router.tasks

    Classes in net.i2p.router.tasks that implement Job
    Modifier and Type | Class and Description
    --- | ---
    `class` | `PersistRouterInfoJob` Router information persistence and synchronization job.
    `class` | `ReadConfigJob` Simply read the router config periodically, so that the user may make config changes externally.
    `class` | `UpdateRoutingKeyModifierJob` Update the routing Key modifier every day at midnight (plus on startup).

  - ### Uses of Job in net.i2p.router.transport

    Classes in net.i2p.router.transport that implement Job
    Modifier and Type | Class and Description
    --- | ---
    `(package private) class` | `GetBidsJob` Retrieves transport bids for outbound message delivery.

    Methods in net.i2p.router.transport with parameters of type Job
    Modifier and Type | Method and Description
    --- | ---
    `OutNetMessage` | OutboundMessageRegistry.`registerPending(MessageSelector replySelector, ReplyJob onReply, Job onTimeout)` Registers a new, empty OutNetMessage, with the reply and timeout jobs specified.

  - ### Uses of Job in net.i2p.router.tunnel.pool

    Classes in net.i2p.router.tunnel.pool that implement Job
    Modifier and Type | Class and Description
    --- | ---
    `(package private) class` | `ExpireJob` Handles tunnel expiration in two phases for graceful shutdown.
    `class` | `TestJob` Repeatedly tests a single tunnel for its lifetime to ensure it remains functional.

  - ### Uses of Job in net.i2p.router.web.helpers

    Classes in net.i2p.router.web.helpers that implement Job
    Modifier and Type | Class and Description
    --- | ---
    `class` | `NetDbCachingJob` A caching job that periodically performs: - Reverse DNS precaching for known routers - Introducer precaching for known routers Ensures: - Only one instance is ever scheduled.