forked from I2P_Developers/i2p.i2p
i2ptunnel: Add hooks to get the session from the contoller
This commit is contained in:
@@ -354,8 +354,9 @@ public class I2PTunnel extends EventDispatcherImpl implements Logging {
|
||||
|
||||
/**
|
||||
* @return A copy, unmodifiable, non-null
|
||||
* @since public since 0.9.53 for advanced plugin usage, was package private
|
||||
*/
|
||||
List<I2PSession> getSessions() {
|
||||
public List<I2PSession> getSessions() {
|
||||
if (_sessions.isEmpty())
|
||||
return Collections.emptyList();
|
||||
return new ArrayList<I2PSession>(_sessions);
|
||||
|
||||
@@ -234,6 +234,15 @@ public class TunnelController implements Logging {
|
||||
_state = keyOK && getStartOnLoad() ? TunnelState.START_ON_LOAD : TunnelState.STOPPED;
|
||||
}
|
||||
|
||||
/**
|
||||
* The I2PTunnel
|
||||
*
|
||||
* @since 0.9.53 for advanced plugin usage
|
||||
*/
|
||||
public I2PTunnel getTunnel() {
|
||||
return _tunnel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return success
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user