All Implemented Interfaces:
Runnable, UpdateTask, EepGet.StatusListener

class UnsignedUpdateCheckerextends UpdateRunner
Does a simple EepHead to get the last-modified header. Moved from NewsFetcher and turned into an UpdateTask.

Overrides UpdateRunner for convenience, does not use super's Eepget StatusListener.

  • Field Details

    • _ms

      private final long _ms
      Milliseconds between checks.
    • _unsignedUpdateAvailable

      private boolean _unsignedUpdateAvailable
      True once an update with no valid signature is found
  • Constructor Details

    • UnsignedUpdateChecker

      public UnsignedUpdateChecker(RouterContext ctx, ConsoleUpdateManager mgr, List<URI> uris, long lastUpdateTime)
      Records the installed version time used to decide if an update is newer.
      Parameters:
      ctx - the router context, passed to the superclass for fetching
      mgr - the update manager to notify of the check's progress and result
      uris - the update URLs to HEAD, tried in turn
      lastUpdateTime - the time in milliseconds of the currently installed version; 0 or less means unknown, and no update is then offered
  • Method Details

    • run

      public void run()
      Checks for a newer unsigned update and reports the outcome to the manager.
      Specified by:
      run in interface Runnable
      Overrides:
      run in class UpdateRunner
    • fetchUnsignedHead

      private boolean fetchUnsignedHead()
      HEAD the update url, and if the last-mod time is newer than the last update we downloaded, as stored in the properties, then we download it using eepget.
      Returns:
      true if the HEAD request succeeded, false if there is no URL or the request failed