public class UpdateHandler extends Object
Handles the request to update the router by firing one or more
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.
Modifier and Type | Field and Description |
---|---|
protected RouterContext |
_context |
protected Log |
_log |
Constructor and Description |
---|
UpdateHandler() |
UpdateHandler(RouterContext ctx) |
Modifier and Type | Method and Description |
---|---|
void |
setContextId(String contextId)
Configure this bean to query a particular router context
|
void |
setUpdateAction(String val)
these two can be set in either order, so call checkUpdateAction() twice
|
void |
setUpdateNonce(String nonce) |
static ConsoleUpdateManager |
updateManager(RouterContext ctx) |
protected RouterContext _context
protected Log _log
public UpdateHandler()
public UpdateHandler(RouterContext ctx)
public static ConsoleUpdateManager updateManager(RouterContext ctx)
public void setContextId(String contextId)
contextId
- beginning few characters of the routerHash, or null to pick
the first one we come across.public void setUpdateAction(String val)
public void setUpdateNonce(String nonce)