public class ConnectionManager<T extends SshContext> extends Object
This class holds the current sessions by TransportProtocol and ConnectionProtocol. The TransportProtocol objects can be used during authentication whilst the ConnectionProtocol objects can be used anytime after authentication. Do not attempt to get a ConnectionProtocol instance before or during user authentication as it is not created until the user has successfully authenticated.
Constructor and Description |
---|
ConnectionManager() |
Modifier and Type | Method and Description |
---|---|
Connection<T>[] |
getAllConnections() |
Connection<T> |
getConnectionById(String sessionid) |
String[] |
getLoggedOnUsers()
Get a list of currently logged on users.
|
Integer |
getNumberOfConnections() |
Connection<T> |
registerConnection(ConnectionProtocol<T> connection) |
void |
registerTransport(TransportProtocol<T> transport,
T sshContext) |
void |
unregisterTransport(TransportProtocol<T> transport) |
public Connection<T> registerConnection(ConnectionProtocol<T> connection)
public Connection<T> getConnectionById(String sessionid)
public Connection<T>[] getAllConnections()
public void registerTransport(TransportProtocol<T> transport, T sshContext)
public void unregisterTransport(TransportProtocol<T> transport)
public String[] getLoggedOnUsers()
public Integer getNumberOfConnections()
Copyright © 2016. All rights reserved.