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.
|
int |
getMaxSourceStartups() |
int |
getStartupCount(InetAddress address) |
Connection[] |
getUserConnections(String username) |
boolean |
hasConnection() |
void |
setMaxSourceStartups(int maxSourceStartups) |
public static ConnectionManager getInstance()
public Connection getConnectionById(String sessionid)
public Connection[] getAllConnections()
public String[] getLoggedOnUsers()
public Connection[] getUserConnections(String username)
public int getStartupCount(InetAddress address)
public void beginConnectionOperation(Connection con)
public void endConnectionOperation()
public boolean hasConnection()
public Connection getConnection()
public int getMaxSourceStartups()
public void setMaxSourceStartups(int maxSourceStartups)
Copyright © 2024. All rights reserved.