public class ConnectionManager 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 any time 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.
Modifier and Type | Method and Description |
---|---|
void |
beginConnectionOperation(Connection con) |
void |
endConnectionOperation() |
Connection[] |
getAllConnections() |
Connection |
getConnection() |
Connection |
getConnectionById(String sessionid) |
static ConnectionManager |
getInstance()
Get the only instance of the ConnectionManager
|
String[] |
getLoggedOnUsers()
Get a list of currently logged on users.
|
Connection[] |
getUserConnections(String username) |
boolean |
hasConnection() |
public static ConnectionManager getInstance()
public Connection getConnectionById(String sessionid)
public Connection[] getAllConnections()
public String[] getLoggedOnUsers()
public Connection[] getUserConnections(String username)
public void beginConnectionOperation(Connection con)
public void endConnectionOperation()
public boolean hasConnection()
public Connection getConnection()
Copyright © 2024. All rights reserved.