net.i2p.router.web
Class PluginUpdateChecker

java.lang.Object
  extended by net.i2p.router.web.UpdateHandler
      extended by net.i2p.router.web.PluginUpdateChecker

public class PluginUpdateChecker
extends UpdateHandler

Check for an updated version of a plugin. A plugin is a standard .sud file with a 40-byte signature, a 16-byte version, and a .zip file. So we get the current version and update URL for the installed plugin, then fetch the first 56 bytes of the URL, extract the version, and compare.

Since:
0.7.12
Author:
zzz

Nested Class Summary
 class PluginUpdateChecker.AllCheckerRunner
          Deprecated. not finished
 class PluginUpdateChecker.PluginUpdateCheckerRunner
           
 
Nested classes/interfaces inherited from class net.i2p.router.web.UpdateHandler
UpdateHandler.UpdateRunner
 
Field Summary
 
Fields inherited from class net.i2p.router.web.UpdateHandler
_context, _log, _updateFile, _updateRunner, CONNECT_TIMEOUT, INACTIVITY_TIMEOUT, NOPROXY_INACTIVITY_TIMEOUT, PROP_LAST_UPDATE_TIME, PROP_UPDATE_IN_PROGRESS, SIGNED_UPDATE_FILE
 
Method Summary
static PluginUpdateChecker getInstance(RouterContext ctx)
           
 boolean isDone()
           
 boolean isNewerAvailable()
           
 boolean isRunning()
           
 void setAppStatus(String status)
           
 void setDoneStatus(String status)
           
 void update()
          Deprecated. not finished
 void update(String appName)
          check a single plugin
 
Methods inherited from class net.i2p.router.web.UpdateHandler
_, _, getStatus, linkify, restart, setContextId, setUpdateAction, setUpdateNonce, updateStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static final PluginUpdateChecker getInstance(RouterContext ctx)

update

public void update()
Deprecated. not finished

check all plugins

Overrides:
update in class UpdateHandler

update

public void update(String appName)
check a single plugin


setAppStatus

public void setAppStatus(String status)
Since:
0.8.13

setDoneStatus

public void setDoneStatus(String status)
Since:
0.8.13

isRunning

public boolean isRunning()

isDone

public boolean isDone()
Overrides:
isDone in class UpdateHandler

isNewerAvailable

public boolean isNewerAvailable()
Since:
0.8.13