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

class DummyHandlerextends Object implements Checker, Updater
Dummy to lock up the updates for a period of time.
  • Field Details

  • Constructor Details

    • DummyHandler

      public DummyHandler(RouterContext ctx, ConsoleUpdateManager mgr)
      Creates a handler that serves dummy update checks only.
      Parameters:
      ctx - router context handed to the runner as the runner's owner
      mgr - update manager notified when the dummy run finishes or fails
  • Method Details

    • check

      public UpdateTask check(UpdateType type, UpdateMethod method, String id, String currentVersion, long maxTime)
      Spins off an UpdateTask that sleeps.
      Specified by:
      check in interface Checker
      Parameters:
      type - the kind of update to look for, e.g. UpdateType.ROUTER_SIGNED
      method - the transport to fetch it over, e.g. UpdateMethod.HTTP
      id - plugin name or ignored
      currentVersion - the running version, compared against the remote one so an equal or older release is not offered
      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)
      Spins off an UpdateTask that sleeps.
      Specified by:
      update in interface Updater
      Parameters:
      type - selects what is being fetched, e.g. UpdateType.ROUTER_SIGNED
      method - how it is fetched, e.g. UpdateMethod.HTTP over I2P
      updateSources - Where to get the new version from
      id - plugin name or ignored
      newVersion - new version to download
      maxTime - how long you have
      Returns:
      active task or null if unable to download