java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.startup.StartupJob
- All Implemented Interfaces:
Job
The StartupJob should be run once on router startup to initialize the system and set things in motion. This task loads the router configuration and then queues up a LoadRouterInfoJob, which reads the old RouterInfo structure from a previously saved version on disk. If it can't find one, it fires up a CreateRouterInfoJob which builds a new one from scratch, including a new RouterIdentity and then reruns the LoadRouterInfoJob. After that the router begins listening on its ports by running the BootCommSystemJob which is followed by the BootNetworkDbJob, though BuildTrustedLinksJob may occur as well. After running the BootNetworkDbJob, the final StartAcceptingClientsJob is queued up, which finishes the startup.
Field Summary
Constructor Summary
ConstructorsConstructorDescriptionStartupJob(RouterContext context) Passes the router context on to the JobImpl superclass.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
StartupJob
Passes the router context on to the JobImpl superclass.- Parameters:
context- the router context the job runs against, passed to the JobImpl superclass
Method Details
getName
runJob
public void runJob()Queue the jobs that boot the router: load client apps and router info.