Class UnsignedUpdateHandler

java.lang.Object
net.i2p.router.update.UnsignedUpdateHandler
All Implemented Interfaces:
Checker, Updater

class UnsignedUpdateHandler extends Object implements Checker, Updater

Handles the request to update the router by firing off an EepGet call to download the latest unsigned zip file and displaying the status to anyone who asks.

After the download completes the signed update file is copied to the router directory, and if configured the router is restarted to complete the update process.

  • Constructor Details

  • Method Details

    • getUpdateSources

      public List<URI> getUpdateSources()
      Returns:
      null if none
      Since:
      0.9.4
    • check

      public UpdateTask check(UpdateType type, UpdateMethod method, String id, String currentVersion, long maxTime)
      Description copied from interface: Checker
      Check for updates. Should not block. If any are found, call back to UpdateManager.notifyUpdateAvailable().
      Specified by:
      check in interface Checker
      Parameters:
      id - plugin name or ignored
      currentVersion - ignored, we use time stored in a property
      maxTime - how long you have
      Returns:
      active task or null if unable to check
    • update

      public UpdateTask update(UpdateType type, UpdateMethod method, List<URI> updateSources, String id, String newVersion, long maxTime)
      Start a download and return a handle to the download task. Should not block.
      Specified by:
      update in interface Updater
      Parameters:
      id - plugin name or ignored
      maxTime - how long you have
      Returns:
      active task or null if unable to download