forked from I2P_Developers/i2p.i2p
* I2PAppContext: New getProperties() method
* i2ptunnel: - Use context properties as defaults
This commit is contained in:
@ -118,8 +118,8 @@ public class I2PTunnel implements Logging, EventDispatcher {
|
|||||||
_tunnelId = ++__tunnelId;
|
_tunnelId = ++__tunnelId;
|
||||||
_log = _context.logManager().getLog(I2PTunnel.class);
|
_log = _context.logManager().getLog(I2PTunnel.class);
|
||||||
_event = new EventDispatcherImpl();
|
_event = new EventDispatcherImpl();
|
||||||
Properties p = new Properties();
|
// as of 0.8.4, include context properties
|
||||||
p.putAll(System.getProperties());
|
Properties p = _context.getProperties();
|
||||||
_clientOptions = p;
|
_clientOptions = p;
|
||||||
_sessions = new ArrayList(1);
|
_sessions = new ArrayList(1);
|
||||||
|
|
||||||
|
@ -483,6 +483,21 @@ public class I2PAppContext {
|
|||||||
return names;
|
return names;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Access the configuration attributes of this context, listing the properties
|
||||||
|
* provided during the context construction, as well as the ones included in
|
||||||
|
* System.getProperties.
|
||||||
|
*
|
||||||
|
* @return new Properties with system and context properties
|
||||||
|
* @since 0.8.4
|
||||||
|
*/
|
||||||
|
public Properties getProperties() {
|
||||||
|
Properties rv = new Properties();
|
||||||
|
rv.putAll(System.getProperties());
|
||||||
|
rv.putAll(_overrideProps);
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The statistics component with which we can track various events
|
* The statistics component with which we can track various events
|
||||||
* over time.
|
* over time.
|
||||||
|
Reference in New Issue
Block a user