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

@ -64,7 +64,7 @@ public class I2PAppContext {
/** the context that components without explicit root are bound */
protected static I2PAppContext _globalAppContext;
private I2PProperties _overrideProps;
protected I2PProperties _overrideProps;
private StatManager _statManager;
private SessionKeyManager _sessionKeyManager;
@ -480,26 +480,13 @@ public class I2PAppContext {
return names;
}
/**
* 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);
}
}
/**
* Add a callback, which will fire upon changes in the property
* given in the specific callback.
* Unimplemented in I2PAppContext: this only makes sense in a router context.
* @param callback The implementation of the callback.
*/
public void addPropertyCallback(I2PPropertyCallback callback) {
_overrideProps.addCallBack(callback);
}
public void addPropertyCallback(I2PPropertyCallback callback) {}
/**
* The statistics component with which we can track various events