Package org.red5.server.net
Interface IConnectionManager<T>
- All Known Implementing Classes:
RTMPConnManager
public interface IConnectionManager<T>
-
Method Summary
Modifier and TypeMethodDescriptioncreateConnection(Class<?> connCls) Creates a connection based on the given type class.createConnection(Class<?> connCls, String sessionId) Creates a connection of the type specified with associated session id.Returns all the current connections.getConnection(int clientId) Returns a connection matching the given client id.getConnectionBySessionId(String sessionId) Returns a connection matching the given session id.removeConnection(int clientId) Removes a connection matching the client id specified.removeConnection(String sessionId) Removes a connection by the given sessionId.Removes all the connections from the set.voidsetConnection(T conn) Adds a connection.
-
Method Details
-
getConnection
Returns a connection matching the given client id.- Parameters:
clientId- client id- Returns:
- connection
-
setConnection
Adds a connection.- Parameters:
conn- connection
-
getConnectionBySessionId
Returns a connection matching the given session id.- Parameters:
sessionId- session id- Returns:
- connection
-
getAllConnections
Collection<T> getAllConnections()Returns all the current connections. It doesn't remove anything.- Returns:
- list of connections
-
createConnection
Creates a connection based on the given type class.- Parameters:
connCls- class- Returns:
- connection
-
createConnection
Creates a connection of the type specified with associated session id.- Parameters:
connCls- classsessionId- session id- Returns:
- connection
-
removeConnection
Removes a connection matching the client id specified. If found, the connection will be returned.- Parameters:
clientId- client id- Returns:
- connection
-
removeConnection
Removes a connection by the given sessionId.- Parameters:
sessionId- session id- Returns:
- connection that was removed
-
removeConnections
Collection<T> removeConnections()Removes all the connections from the set.- Returns:
- connections
-