Package org.red5.server.net
Interface IConnectionManager<T>
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.getConnectionBySessionId(String sessionId) Returns a connection matching the given session id.removeConnection(String sessionId) Removes a connection by the given sessionId.removeConnection(T conn) Removes a connection matching the client id specified.Removes all the connections from the set.
-
Method Details
-
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:
conn- the connection to be removed- 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
-