Class UpdateHandler

java.lang.Object
org.klomp.snark.UpdateHandler
All Implemented Interfaces:
Updater

class UpdateHandler extends Object implements Updater

Handles the request to update the router by firing up a magnet. EepGet calls to download the latest signed update file and displaying the status to anyone who asks.

After the download completes the signed update file is verified with TrustedUpdate, and if it's authentic the payload of the signed update file is unpacked and the router is restarted to complete the update process.

This does not do any checking, that is handled by the NewsFetcher.
Since:
0.9.4
  • Constructor Details

  • Method Details

    • 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