- Lots of fixes for notifying when updates and checks are complete

- Fixes for NewsHelper stored timestamps
- Add getProperty(String, long) to context for sanity
- New methods and types
- Logging improvements
- Add failsafe TaskCleaner
This commit is contained in:
zzz committed 2012-10-18 14:28:14 +00:00
1 parent 2b50c5aaf4
commit 0b4401e64b
13 files changed
+145 -76

No files matched your search

+20
View File
@@ -479,6 +479,26 @@ public class I2PAppContext {
return ival;
}
/**
* Return a long with a long default
* @since 0.9.4
*/
public long getProperty(String propName, long defaultVal) {
String val = null;
if (_overrideProps != null) {
val = _overrideProps.getProperty(propName);
if (val == null)
val = System.getProperty(propName);
}
long rv = defaultVal;
if (val != null) {
try {
rv = Long.parseLong(val);
} catch (NumberFormatException nfe) {}
}
return rv;
}
/**
* Return a boolean with a boolean default
* @since 0.7.12
@@ -9,6 +9,7 @@ public enum UpdateMethod {
METHOD_DUMMY,
HTTP, // .i2p or via outproxy
HTTP_CLEARNET, // direct non-.i2p
HTTPS_CLEARNET, // direct non-.i2p
TORRENT,
GNUTELLA, IMULE, TAHOE_LAFS,
DEBIAN
+2 -1
View File
@@ -12,5 +12,6 @@ public enum UpdateType {
ROUTER_SIGNED_PACK200, // unused, use ROUTER_SIGNED for both
ROUTER_UNSIGNED,
PLUGIN, PLUGIN_INSTALL,
GEOIP, BLOCKLIST, RESEED
GEOIP, BLOCKLIST, RESEED,
HOMEPAGE
}