Package org.red5.client.net.rtmp
Class RTMPClientConnManager
java.lang.Object
org.red5.client.net.rtmp.RTMPClientConnManager
- All Implemented Interfaces:
IConnectionManager<BaseConnection>
Responsible for management and creation of RTMP based connections.
- Author:
- The Red5 Project
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ConcurrentMap<String, BaseConnection> protected AtomicIntegerprotected static booleanprotected static IConnectionManager<BaseConnection> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateConnection(Class<?> connCls) createConnection(Class<?> connCls, String sessionId) createConnectionInstance(Class<?> cls) Creates a connection instance based on the supplied type.getConnectionBySessionId(String sessionId) Returns a connection for a given session id.static IConnectionManager<BaseConnection> removeConnection(String sessionId) static voidsetEnableTaskExecutor(boolean enableTaskExecutor) static voidsetExecutorQueueCapacity(int executorQueueCapacity) static voidsetMaxHandshakeTimeout(int maxHandshakeTimeout) static voidsetMaxInactivity(int maxInactivity) static voidsetPingInterval(int pingInterval)
-
Field Details
-
enableTaskExecutor
protected static boolean enableTaskExecutor -
instance
-
connMap
-
conns
-
-
Constructor Details
-
RTMPClientConnManager
public RTMPClientConnManager()
-
-
Method Details
-
getInstance
-
createConnection
- Specified by:
createConnectionin interfaceIConnectionManager<BaseConnection>
-
createConnection
- Specified by:
createConnectionin interfaceIConnectionManager<BaseConnection>
-
getConnectionBySessionId
Returns a connection for a given session id.- Specified by:
getConnectionBySessionIdin interfaceIConnectionManager<BaseConnection>- Parameters:
sessionId- session id- Returns:
- connection if found and null otherwise
-
removeConnection
- Specified by:
removeConnectionin interfaceIConnectionManager<BaseConnection>
-
removeConnection
- Specified by:
removeConnectionin interfaceIConnectionManager<BaseConnection>
-
getAllConnections
- Specified by:
getAllConnectionsin interfaceIConnectionManager<BaseConnection>
-
removeConnections
- Specified by:
removeConnectionsin interfaceIConnectionManager<BaseConnection>
-
createConnectionInstance
Creates a connection instance based on the supplied type.- Parameters:
cls- class- Returns:
- connection
- Throws:
Exception- thrown
-
setMaxHandshakeTimeout
public static void setMaxHandshakeTimeout(int maxHandshakeTimeout) -
setMaxInactivity
public static void setMaxInactivity(int maxInactivity) -
setPingInterval
public static void setPingInterval(int pingInterval) -
setExecutorQueueCapacity
public static void setExecutorQueueCapacity(int executorQueueCapacity) -
setEnableTaskExecutor
public static void setEnableTaskExecutor(boolean enableTaskExecutor)
-