java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.startup.LoadRouterInfoJob
All Implemented Interfaces:
Job

class LoadRouterInfoJobextends JobImpl
Run once or twice at startup by StartupJob, and then runs BootCommSystemJob.
  • Constructor Details

    • LoadRouterInfoJob

      public LoadRouterInfoJob(RouterContext ctx)
      Opens the job's log and initializes the ban logger.
      Parameters:
      ctx - the router context supplying the log and the ban logger
  • Method Details

    • getName

      public String getName()
      Name of this job.
      Returns:
      the name this job is listed under in the job queue and the logs, "Load Local RouterInfo"
    • runJob

      public void runJob()
      Load the local RouterInfo, rebuilding it if the files are missing.
    • readKeyData

      public static LoadRouterInfoJob.KeyData readKeyData(File rkf1, File rkf2) throws DataFormatException, IOException
      Read key data from the specified files.
      Parameters:
      rkf1 - in router.keys format, tried second
      rkf2 - in eepPriv.dat format, tried first
      Returns:
      non-null, throws IOE if neither exists
      Throws:
      DataFormatException - if the stored key pairs do not validate against each other
      IOException - if a key file exists but cannot be opened or read