net.i2p.router.web
Class UpdateHandler
java.lang.Object
net.i2p.router.web.UpdateHandler
- Direct Known Subclasses:
- UnsignedUpdateHandler
public class UpdateHandler
- extends java.lang.Object
Handles the request to update the router by firing off an
EepGet
call 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.
Method Summary |
static java.lang.String |
getStatus()
|
boolean |
isDone()
|
protected void |
restart()
|
void |
setContextId(java.lang.String contextId)
Configure this bean to query a particular router context |
void |
setUpdateAction(java.lang.String val)
these two can be set in either order, so call checkUpdateAction() twice |
void |
setUpdateNonce(java.lang.String nonce)
|
void |
update()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_updateRunner
protected static UpdateHandler.UpdateRunner _updateRunner
_context
protected RouterContext _context
_log
protected Log _log
_updateFile
protected java.lang.String _updateFile
_status
protected static java.lang.String _status
SIGNED_UPDATE_FILE
protected static final java.lang.String SIGNED_UPDATE_FILE
- See Also:
- Constant Field Values
PROP_UPDATE_IN_PROGRESS
protected static final java.lang.String PROP_UPDATE_IN_PROGRESS
- See Also:
- Constant Field Values
PROP_LAST_UPDATE_TIME
protected static final java.lang.String PROP_LAST_UPDATE_TIME
- See Also:
- Constant Field Values
UpdateHandler
public UpdateHandler()
UpdateHandler
public UpdateHandler(RouterContext ctx)
setContextId
public void setContextId(java.lang.String contextId)
- Configure this bean to query a particular router context
- Parameters:
contextId
- beginning few characters of the routerHash, or null to pick
the first one we come across.
setUpdateAction
public void setUpdateAction(java.lang.String val)
- these two can be set in either order, so call checkUpdateAction() twice
setUpdateNonce
public void setUpdateNonce(java.lang.String nonce)
update
public void update()
getStatus
public static java.lang.String getStatus()
isDone
public boolean isDone()
restart
protected void restart()