Update: Preliminary work for su3 router updates:

- new ROUTER_SIGNED_SU3 UpdateType
   - Add support for torrent and HTTP
   - Refactor UpdateRunners to return actual UpdateType
   - Deal with signed/su3 conflicts
   - unpack/verify stubbed only
This commit is contained in:
zzz
2013-09-22 18:03:56 +00:00
parent 6fede7f524
commit f47ec65b8f
17 changed files with 205 additions and 66 deletions

View File

@@ -22,6 +22,7 @@ class UpdateRunner implements UpdateTask, CompleteListener {
private final Log _log;
private final UpdateManager _umgr;
private final SnarkManager _smgr;
private final UpdateType _type;
private final List<URI> _urls;
private volatile boolean _isRunning;
private volatile boolean _hasMetaInfo;
@@ -36,11 +37,12 @@ class UpdateRunner implements UpdateTask, CompleteListener {
private static final long CHECK_INTERVAL = 3*60*1000;
public UpdateRunner(I2PAppContext ctx, UpdateManager umgr, SnarkManager smgr,
List<URI> uris, String newVersion) {
UpdateType type, List<URI> uris, String newVersion) {
_context = ctx;
_log = ctx.logManager().getLog(getClass());
_umgr = umgr;
_smgr = smgr;
_type = type;
_urls = uris;
_newVersion = newVersion;
}
@@ -56,7 +58,7 @@ class UpdateRunner implements UpdateTask, CompleteListener {
}
}
public UpdateType getType() { return UpdateType.ROUTER_SIGNED; }
public UpdateType getType() { return _type; }
public UpdateMethod getMethod() { return UpdateMethod.TORRENT; }