Moved I2PProperties callback to the RouterContext.

This commit is contained in:
mathiasdm
2011-01-07 17:09:27 +00:00
parent 9b0c42ca6f
commit 7710b22cfd
6 changed files with 74 additions and 47 deletions

View File

@@ -23,6 +23,7 @@ import net.i2p.router.tunnel.TunnelDispatcher;
import net.i2p.router.tunnel.pool.TunnelPoolManager;
import net.i2p.util.Clock;
import net.i2p.util.KeyRing;
import net.i2p.util.I2PProperties.I2PPropertyCallback;
/**
* Build off the core I2P context to provide a root for a router instance to
@@ -104,6 +105,24 @@ public class RouterContext extends I2PAppContext {
}
return envProps;
}
/**
* Modify the configuration attributes of this context, changing
* one of the properties provided during the context construction.
* @param propName The name of the property.
* @param value The new value for the property.
*/
public void setProperty(String propName, String value) {
if(_overrideProps != null) {
_overrideProps.setProperty(propName, value);
}
}
public void addPropertyCallback(I2PPropertyCallback callback) {
_overrideProps.addCallBack(callback);
}
public void initAll() {
if ("false".equals(getProperty("i2p.dummyClientFacade", "false")))