Class RTMPConnection

All Implemented Interfaces:
IEventDispatcher, IEventHandler, IEventListener, IAttributeStore, ICastingAttributeStore, IConnection, ICoreObject, IServiceCapableConnection, IStreamCapableConnection, AttributeStoreMXBean, IReceivedMessageTaskQueueListener
Direct Known Subclasses:
RTMPMinaConnection

RTMP connection. Stores information about client streams, data transfer channels, pending RPC calls, bandwidth configuration, AMF encoding type (AMF0/AMF3), connection state (is alive, last ping time and ping result) and session.
  • Field Details

    • log

      private static org.slf4j.Logger log
    • RTMP_SESSION_ID

      public static final String RTMP_SESSION_ID
      See Also:
    • RTMP_HANDSHAKE

      public static final String RTMP_HANDSHAKE
      See Also:
    • RTMP_CONN_MANAGER

      public static final String RTMP_CONN_MANAGER
      See Also:
    • RTMP_HANDLER

      public static final Object RTMP_HANDLER
    • RTMP_NON_ENCRYPTED

      public static final byte RTMP_NON_ENCRYPTED
      Marker byte for standard or non-encrypted RTMP data.
      See Also:
    • RTMP_ENCRYPTED

      public static final byte RTMP_ENCRYPTED
      Marker byte for encrypted RTMP data.
      See Also:
    • RTMP_ENCRYPTED_XTEA

      public static final byte RTMP_ENCRYPTED_XTEA
      Marker byte for encrypted RTMP data XTEA. http://en.wikipedia.org/wiki/XTEA
      See Also:
    • RTMP_ENCRYPTED_BLOWFISH

      public static final byte RTMP_ENCRYPTED_BLOWFISH
      Marker byte for encrypted RTMP data using Blowfish. http://en.wikipedia.org/wiki/Blowfish_(cipher)
      See Also:
    • RTMP_ENCRYPTED_UNK

      public static final byte RTMP_ENCRYPTED_UNK
      Unknown type 0x0a, seen on youtube
      See Also:
    • RTMPE_CIPHER_IN

      public static final String RTMPE_CIPHER_IN
      Cipher for RTMPE input
      See Also:
    • RTMPE_CIPHER_OUT

      public static final String RTMPE_CIPHER_OUT
      Cipher for RTMPE output
      See Also:
    • MAX_RESERVED_STREAMS

      public static final double MAX_RESERVED_STREAMS
      See Also:
    • channelsInitalCapacity

      private int channelsInitalCapacity
      Initial channel capacity
    • channelsConcurrencyLevel

      private int channelsConcurrencyLevel
      Concurrency level for channels collection
    • streamsInitalCapacity

      private int streamsInitalCapacity
      Initial streams capacity
    • streamsConcurrencyLevel

      private int streamsConcurrencyLevel
      Concurrency level for streams collection
    • pendingCallsInitalCapacity

      private int pendingCallsInitalCapacity
      Initial pending calls capacity
    • pendingCallsConcurrencyLevel

      private int pendingCallsConcurrencyLevel
      Concurrency level for pending calls collection
    • reservedStreamsInitalCapacity

      private int reservedStreamsInitalCapacity
      Initial reserved streams capacity
    • reservedStreamsConcurrencyLevel

      private int reservedStreamsConcurrencyLevel
      Concurrency level for reserved streams collection
    • channels

      private transient ConcurrentMap<Integer,Channel> channels
      Connection channels
      See Also:
    • tasksByStreams

      private final transient ConcurrentMap<Integer,ReceivedMessageTaskQueue> tasksByStreams
      Queues of tasks for every channel
      See Also:
    • streams

      private transient ConcurrentMap<Number,IClientStream> streams
      Client streams
      See Also:
    • reservedStreams

      private transient Set<Number> reservedStreams
      Reserved stream ids. Stream id's directly relate to individual NetStream instances.
    • transactionId

      private AtomicInteger transactionId
      Transaction identifier for remote commands.
    • pendingCalls

      private transient ConcurrentMap<Integer,IPendingServiceCall> pendingCalls
      Hash map that stores pending calls and ids as pairs.
    • deferredResults

      private transient CopyOnWriteArraySet<DeferredResult> deferredResults
      Deferred results set.
      See Also:
    • lastPingRoundTripTime

      private AtomicInteger lastPingRoundTripTime
      Last ping round trip time
    • lastPingSentOn

      private AtomicLong lastPingSentOn
      Timestamp when last ping command was sent.
    • lastPongReceivedOn

      private AtomicLong lastPongReceivedOn
      Timestamp when last ping result was received.
    • handler

      protected transient IRTMPHandler handler
      RTMP events handler
    • pingInterval

      private volatile int pingInterval
      Ping interval in ms to detect dead clients.
    • maxInactivity

      protected volatile int maxInactivity
      Maximum time in ms after which a client is disconnected because of inactivity.
    • bytesReadInterval

      protected long bytesReadInterval
      Data read interval
    • nextBytesRead

      protected long nextBytesRead
      Number of bytes to read next.
    • clientBytesRead

      private AtomicLong clientBytesRead
      Number of bytes the client reported to have received.
    • pendingVideos

      private transient ConcurrentMap<Number,AtomicInteger> pendingVideos
      Map for pending video packets keyed by stream id.
    • usedStreams

      private AtomicInteger usedStreams
      Number of (NetStream) streams used.
    • streamBuffers

      private transient ConcurrentMap<Number,Integer> streamBuffers
      Remembered stream buffer durations.
    • maxHandshakeTimeout

      private int maxHandshakeTimeout
      Maximum time in milliseconds to wait for a valid handshake.
    • maxHandlingTimeout

      protected long maxHandlingTimeout
      Maximum time in milliseconds allowed to process received message
    • limitType

      protected int limitType
      Bandwidth limit type / enforcement. (0=hard,1=soft,2=dynamic)
    • state

      protected RTMP state
      Protocol state
    • decoderLock

      protected transient Semaphore decoderLock
    • encoderLock

      protected transient Semaphore encoderLock
    • decoderState

      protected transient RTMPDecodeState decoderState
    • scheduler

      protected transient ThreadPoolTaskScheduler scheduler
      Scheduling service
    • executor

      protected transient ThreadPoolTaskExecutor executor
      Thread pool for message handling.
    • deadlockGuardScheduler

      protected transient ThreadPoolTaskScheduler deadlockGuardScheduler
      Thread pool for guarding deadlocks.
    • running

      protected final AtomicBoolean running
      Keep-alive worker flag
    • timer

      private final AtomicInteger timer
      Timestamp generator
    • closing

      private final AtomicBoolean closing
      Closing flag
    • packetSequence

      private final AtomicLong packetSequence
      Packet sequence number
    • executorQueueSizeToDropAudioPackets

      private Integer executorQueueSizeToDropAudioPackets
      Specify the size of queue that will trigger audio packet dropping, disabled if it's 0
    • currentQueueSize

      private final AtomicInteger currentQueueSize
      Keep track of current queue size
    • waitForHandshakeTask

      private ScheduledFuture<?> waitForHandshakeTask
      Wait for handshake task.
    • keepAliveTask

      private ScheduledFuture<?> keepAliveTask
      Keep alive task.
  • Constructor Details

    • RTMPConnection

      @ConstructorProperties("type") public RTMPConnection(String type)
      Creates anonymous RTMP connection without scope.
      Parameters:
      type - Connection type
  • Method Details

    • getId

      public int getId()
    • setId

      @Deprecated public void setId(int clientId)
      Deprecated.
    • setHandler

      public void setHandler(IRTMPHandler handler)
    • getHandler

      public IRTMPHandler getHandler()
    • getState

      public RTMP getState()
    • getStateCode

      public byte getStateCode()
    • setStateCode

      public void setStateCode(byte code)
    • getIoSession

      public org.apache.mina.core.session.IoSession getIoSession()
    • getDecoderLock

      public Semaphore getDecoderLock()
      Returns:
      the decoderLock
    • getEncoderLock

      public Semaphore getEncoderLock()
      Returns:
      the decoderLock
    • getDecoderState

      public RTMPDecodeState getDecoderState()
      Returns:
      the decoderState
    • setBandwidth

      public void setBandwidth(int mbits)
      Sets the bandwidth using a mbit/s value.
      Specified by:
      setBandwidth in interface IConnection
      Parameters:
      mbits - target
    • getTimer

      public int getTimer()
      Returns a usable timestamp for written packets.
      Returns:
      timestamp
    • open

      public void open()
      Opens the connection.
    • connect

      public boolean connect(IScope newScope, Object[] params)
      Description copied from class: BaseConnection
      Connect to another scope on server with given parameters
      Specified by:
      connect in interface IConnection
      Overrides:
      connect in class BaseConnection
      Parameters:
      newScope - New scope
      params - Parameters to connect with
      Returns:
      true on success, false otherwise
    • startWaitForHandshake

      public void startWaitForHandshake()
      Start waiting for a valid handshake.
    • stopWaitForHandshake

      private void stopWaitForHandshake()
      Cancels wait for handshake task.
    • startRoundTripMeasurement

      private void startRoundTripMeasurement()
      Starts measurement.
    • stopRoundTripMeasurement

      private void stopRoundTripMeasurement()
      Stops measurement.
    • setup

      public void setup(String host, String path, Map<String,Object> params)
      Initialize connection.
      Parameters:
      host - Connection host
      path - Connection path
      params - Params passed from client
    • getEncoding

      public IConnection.Encoding getEncoding()
      Return AMF protocol encoding used by this connection.
      Specified by:
      getEncoding in interface IConnection
      Returns:
      AMF encoding used by connection
    • getNextAvailableChannelId

      public int getNextAvailableChannelId()
      Getter for next available channel id.
      Returns:
      Next available channel id
    • isChannelUsed

      public boolean isChannelUsed(int channelId)
      Checks whether channel is used.
      Parameters:
      channelId - Channel id
      Returns:
      true if channel is in use, false otherwise
    • getChannel

      public Channel getChannel(int channelId)
      Return channel by id.
      Parameters:
      channelId - Channel id
      Returns:
      Channel by id
    • closeChannel

      public void closeChannel(int channelId)
      Closes channel.
      Parameters:
      channelId - Channel id
    • getStreams

      protected Collection<IClientStream> getStreams()
      Getter for client streams.
      Returns:
      Client streams as array
    • getStreamsMap

      public Map<Number,IClientStream> getStreamsMap()
      Specified by:
      getStreamsMap in interface IStreamCapableConnection
    • reserveStreamId

      public Number reserveStreamId()
      Return a reserved stream id for use. According to FCS/FMS regulation, the base is 1.
      Specified by:
      reserveStreamId in interface IStreamCapableConnection
      Returns:
      Reserved stream id
    • reserveStreamId

      public Number reserveStreamId(Number streamId)
      Return a reserved stream id for use with a preference for the one supplied.
      Specified by:
      reserveStreamId in interface IStreamCapableConnection
      Parameters:
      streamId - supplied stream id
      Returns:
      Reserved stream id
    • isValidStreamId

      public boolean isValidStreamId(Number streamId)
      Returns whether or not a given stream id is valid.
      Parameters:
      streamId - stream id
      Returns:
      true if its valid, false if its invalid
    • isIdle

      public boolean isIdle()
      Returns whether or not the connection has been idle for a maximum period.
      Returns:
      true if max idle period has been exceeded, false otherwise
    • isDisconnected

      public boolean isDisconnected()
      Returns whether or not the connection is disconnected.
      Returns:
      true if connection state is RTMP.STATE_DISCONNECTED, false otherwise
    • newBroadcastStream

      public IClientBroadcastStream newBroadcastStream(Number streamId)
      Create a broadcast stream.
      Specified by:
      newBroadcastStream in interface IStreamCapableConnection
      Parameters:
      streamId - Stream id
      Returns:
      New broadcast stream
    • newSingleItemSubscriberStream

      public ISingleItemSubscriberStream newSingleItemSubscriberStream(Number streamId)
      Create a stream that can play only one item.
      Specified by:
      newSingleItemSubscriberStream in interface IStreamCapableConnection
      Parameters:
      streamId - Stream id
      Returns:
      New subscriber stream that can play only one item
    • newPlaylistSubscriberStream

      public IPlaylistSubscriberStream newPlaylistSubscriberStream(Number streamId)
      Create a stream that can play a list.
      Specified by:
      newPlaylistSubscriberStream in interface IStreamCapableConnection
      Parameters:
      streamId - Stream id
      Returns:
      New stream that can play sequence of items
    • addClientStream

      public void addClientStream(IClientStream stream)
    • removeClientStream

      public void removeClientStream(Number streamId)
    • getUsedStreamCount

      protected int getUsedStreamCount()
      Getter for used stream count.
      Returns:
      Value for property 'usedStreamCount'.
    • getStreamById

      public IClientStream getStreamById(Number streamId)
      Get a stream by its id.
      Specified by:
      getStreamById in interface IStreamCapableConnection
      Parameters:
      streamId - Stream id
      Returns:
      Stream with given id
    • getStreamIdForChannelId

      public Number getStreamIdForChannelId(int channelId)
      Return stream id for given channel id.
      Parameters:
      channelId - Channel id
      Returns:
      ID of stream that channel belongs to
    • getStreamByChannelId

      public IClientStream getStreamByChannelId(int channelId)
      Return stream by given channel id.
      Parameters:
      channelId - Channel id
      Returns:
      Stream that channel belongs to
    • getChannelIdForStreamId

      public int getChannelIdForStreamId(Number streamId)
      Return channel id for given stream id.
      Parameters:
      streamId - Stream id
      Returns:
      ID of channel that belongs to the stream
    • createOutputStream

      public OutputStream createOutputStream(Number streamId)
      Creates output stream object from stream id. Output stream consists of audio, video, and data channels.
      Parameters:
      streamId - Stream id
      Returns:
      Output stream object
      See Also:
    • customizeStream

      private void customizeStream(Number streamId, AbstractClientStream stream)
      Specify name, connection, scope and etc for stream
      Parameters:
      streamId - Stream id
      stream - Stream
    • registerStream

      private boolean registerStream(IClientStream stream)
      Store a stream in the connection.
      Parameters:
      stream -
    • unregisterStream

      private void unregisterStream(IClientStream stream)
      Remove a stream from the connection.
      Parameters:
      stream -
    • close

      public void close()
      Closes connection
      Specified by:
      close in interface IConnection
      Overrides:
      close in class BaseConnection
    • logWarning

      public void logWarning()
    • logStream

      public void logStream(IClientStream stream)
    • dispatchEvent

      public void dispatchEvent(IEvent event)
      Dispatches event
      Specified by:
      dispatchEvent in interface IEventDispatcher
      Overrides:
      dispatchEvent in class BaseConnection
      Parameters:
      event - Event
    • sendPendingServiceCallsCloseError

      public void sendPendingServiceCallsCloseError()
      When the connection has been closed, notify any remaining pending service calls that they have failed because the connection is broken. Implementors of IPendingServiceCallback may only deduce from this notification that it was not possible to read a result for this service call. It is possible that (1) the service call was never written to the service, or (2) the service call was written to the service and although the remote method was invoked, the connection failed before the result could be read, or (3) although the remote method was invoked on the service, the service implementor detected the failure of the connection and performed only partial processing. The caller only knows that it cannot be confirmed that the callee has invoked the service call and returned a result.
    • unreserveStreamId

      public void unreserveStreamId(Number streamId)
      Unreserve this id for future use.
      Specified by:
      unreserveStreamId in interface IStreamCapableConnection
      Parameters:
      streamId - ID of stream to unreserve
    • deleteStreamById

      public void deleteStreamById(Number streamId)
      Deletes the stream with the given id.
      Specified by:
      deleteStreamById in interface IStreamCapableConnection
      Parameters:
      streamId - ID of stream to delete
    • ping

      public void ping(Ping ping)
      Handler for ping event.
      Parameters:
      ping - Ping event context
    • write

      public abstract void write(Packet out)
      Write packet.
      Parameters:
      out - Packet
    • writeRaw

      public abstract void writeRaw(org.apache.mina.core.buffer.IoBuffer out)
      Write raw byte buffer.
      Parameters:
      out - IoBuffer
    • updateBytesRead

      protected void updateBytesRead()
      Update number of bytes to read next value.
    • receivedBytesRead

      public void receivedBytesRead(int bytes)
      Read number of received bytes.
      Parameters:
      bytes - Number of bytes
    • getClientBytesRead

      public long getClientBytesRead()
      Get number of bytes the client reported to have received.
      Specified by:
      getClientBytesRead in interface IConnection
      Overrides:
      getClientBytesRead in class BaseConnection
      Returns:
      Number of bytes
      See Also:
    • invoke

      public void invoke(IServiceCall call)
      Invokes service using remoting call object.
      Specified by:
      invoke in interface IServiceCapableConnection
      Parameters:
      call - Service call object
    • getTransactionId

      public int getTransactionId()
      Generate next invoke id.
      Returns:
      Next invoke id for RPC
    • registerPendingCall

      public void registerPendingCall(int invokeId, IPendingServiceCall call)
      Register pending call (remote function call that is yet to finish).
      Parameters:
      invokeId - Deferred operation id
      call - Call service
    • invoke

      public void invoke(IServiceCall call, int channel)
      Invoke service using call and channel.
      Specified by:
      invoke in interface IServiceCapableConnection
      Parameters:
      call - Service call
      channel - Channel used
    • invoke

      public void invoke(String method)
      Invoke method by name.
      Specified by:
      invoke in interface IServiceCapableConnection
      Parameters:
      method - Called method name
    • invoke

      public void invoke(String method, Object[] params)
      Invoke method with parameters.
      Specified by:
      invoke in interface IServiceCapableConnection
      Parameters:
      method - Method name
      params - Invocation parameters passed to method
    • invoke

      public void invoke(String method, IPendingServiceCallback callback)
      Invoke method by name with callback.
      Specified by:
      invoke in interface IServiceCapableConnection
      Parameters:
      method - Called method name
      callback - Callback
    • invoke

      public void invoke(String method, Object[] params, IPendingServiceCallback callback)
      Invoke method with parameters.
      Specified by:
      invoke in interface IServiceCapableConnection
      Parameters:
      method - by name
      params - method params
      callback - callback
    • notify

      public void notify(IServiceCall call)
      Notify method.
      Specified by:
      notify in interface IServiceCapableConnection
      Parameters:
      call - service call
    • notify

      public void notify(IServiceCall call, int channel)
      Notify method with channel id.
      Specified by:
      notify in interface IServiceCapableConnection
      Parameters:
      call - service call
      channel - channel id
    • notify

      public void notify(String method)
      Notify method.
      Specified by:
      notify in interface IServiceCapableConnection
      Parameters:
      method - by name
    • notify

      public void notify(String method, Object[] params)
      Notify method with parameters.
      Specified by:
      notify in interface IServiceCapableConnection
      Parameters:
      method - by name
      params - method params
    • status

      public void status(Status status)
      Sends a status object to the connection.
      Specified by:
      status in interface IServiceCapableConnection
      Parameters:
      status - Status
    • status

      public void status(Status status, int channel)
      Sends a status object to the connection on a given channel.
      Specified by:
      status in interface IServiceCapableConnection
      Parameters:
      status - Status
      channel - channel id
    • getReadBytes

      public long getReadBytes()
      Total number of bytes read from the connection.
      Specified by:
      getReadBytes in interface IConnection
      Specified by:
      getReadBytes in class BaseConnection
      Returns:
      bytes read
    • getWrittenBytes

      public long getWrittenBytes()
      Total number of bytes written to the connection.
      Specified by:
      getWrittenBytes in interface IConnection
      Specified by:
      getWrittenBytes in class BaseConnection
      Returns:
      bytes written
    • getPendingCall

      public IPendingServiceCall getPendingCall(int invokeId)
      Get pending call service by id.
      Parameters:
      invokeId - Pending call service id
      Returns:
      Pending call service object
    • retrievePendingCall

      public IPendingServiceCall retrievePendingCall(int invokeId)
      Retrieves and removes the pending call service by id.
      Parameters:
      invokeId - Pending call service id
      Returns:
      Pending call service object
    • createStreamName

      protected String createStreamName()
      Generates new stream name.
      Returns:
      New stream name
    • writingMessage

      protected void writingMessage(Packet message)
      Mark message as being written.
      Parameters:
      message - Message to mark
    • messageReceived

      public void messageReceived()
      Increases number of read messages by one. Updates number of bytes read.
    • getMessageType

      private String getMessageType(Packet packet)
    • messageTypeToName

      public String messageTypeToName(byte headerDataType)
    • handleMessageReceived

      public void handleMessageReceived(Packet message)
      Handle the incoming message.
      Parameters:
      message - message
    • onTaskAdded

      public void onTaskAdded(ReceivedMessageTaskQueue queue)
      Specified by:
      onTaskAdded in interface IReceivedMessageTaskQueueListener
    • onTaskRemoved

      public void onTaskRemoved(ReceivedMessageTaskQueue queue)
      Specified by:
      onTaskRemoved in interface IReceivedMessageTaskQueueListener
    • processTasksQueue

      private void processTasksQueue(ReceivedMessageTaskQueue currentStreamTasks)
    • messageSent

      public void messageSent(Packet message)
      Mark message as sent.
      Parameters:
      message - Message to mark
    • messageDropped

      protected void messageDropped()
      Increases number of dropped messages.
    • currentQueueSize

      protected int currentQueueSize()
      Returns the current received message queue size.
      Returns:
      current message queue size
    • getPendingVideoMessages

      public long getPendingVideoMessages(Number streamId)
      Count of outgoing video messages not yet written.
      Specified by:
      getPendingVideoMessages in interface IStreamCapableConnection
      Overrides:
      getPendingVideoMessages in class BaseConnection
      Parameters:
      streamId - the id you want to know about
      Returns:
      pending messages for this streamId
    • ping

      public void ping()
      Start measuring the round-trip time for a packet on the connection.
      Specified by:
      ping in interface IConnection
    • pingReceived

      public void pingReceived(Ping pong)
      Marks that ping back was received.
      Parameters:
      pong - Ping object
    • getLastPingSentAndLastPongReceivedInterval

      public int getLastPingSentAndLastPongReceivedInterval()
      Difference between when the last ping was sent and when the last pong was received.
      Returns:
      last interval of ping minus pong
    • getLastPingTime

      public int getLastPingTime()
      Return round-trip time of last ping command.
      Specified by:
      getLastPingTime in interface IConnection
      Returns:
      round-trip time in milliseconds
    • setPingInterval

      public void setPingInterval(int pingInterval)
      Setter for ping interval.
      Parameters:
      pingInterval - Interval in ms to ping clients. Set to 0 to disable ghost detection code.
    • setMaxInactivity

      public void setMaxInactivity(int maxInactivity)
      Setter for maximum inactivity.
      Parameters:
      maxInactivity - Maximum time in ms after which a client is disconnected in case of inactivity.
    • onInactive

      protected abstract void onInactive()
      Inactive state event handler.
    • setScheduler

      public void setScheduler(ThreadPoolTaskScheduler scheduler)
      Sets the scheduler.
      Parameters:
      scheduler - scheduling service / thread executor
    • getScheduler

      public ThreadPoolTaskScheduler getScheduler()
      Returns:
      the scheduler
    • getExecutor

      public ThreadPoolTaskExecutor getExecutor()
    • setExecutor

      public void setExecutor(ThreadPoolTaskExecutor executor)
    • getDeadlockGuardScheduler

      public ThreadPoolTaskScheduler getDeadlockGuardScheduler()
      Thread pool for guarding deadlocks
      Returns:
      the deadlockGuardScheduler
    • setDeadlockGuardScheduler

      public void setDeadlockGuardScheduler(ThreadPoolTaskScheduler deadlockGuardScheduler)
      Thread pool for guarding deadlocks
      Parameters:
      deadlockGuardScheduler - the deadlockGuardScheduler to set
    • registerDeferredResult

      public void registerDeferredResult(DeferredResult result)
      Registers deferred result.
      Parameters:
      result - Result to register
    • unregisterDeferredResult

      public void unregisterDeferredResult(DeferredResult result)
      Unregister deferred result
      Parameters:
      result - Result to unregister
    • rememberStreamBufferDuration

      public void rememberStreamBufferDuration(int streamId, int bufferDuration)
    • setMaxHandshakeTimeout

      public void setMaxHandshakeTimeout(int maxHandshakeTimeout)
      Set maximum time to wait for valid handshake in milliseconds.
      Parameters:
      maxHandshakeTimeout - Maximum time in milliseconds
    • getMaxHandlingTimeout

      public long getMaxHandlingTimeout()
    • setMaxHandlingTimeout

      public void setMaxHandlingTimeout(long maxHandlingTimeout)
    • getChannelsInitalCapacity

      public int getChannelsInitalCapacity()
    • setChannelsInitalCapacity

      public void setChannelsInitalCapacity(int channelsInitalCapacity)
    • getChannelsConcurrencyLevel

      public int getChannelsConcurrencyLevel()
    • setChannelsConcurrencyLevel

      public void setChannelsConcurrencyLevel(int channelsConcurrencyLevel)
    • getStreamsInitalCapacity

      public int getStreamsInitalCapacity()
    • setStreamsInitalCapacity

      public void setStreamsInitalCapacity(int streamsInitalCapacity)
    • getStreamsConcurrencyLevel

      public int getStreamsConcurrencyLevel()
    • setStreamsConcurrencyLevel

      public void setStreamsConcurrencyLevel(int streamsConcurrencyLevel)
    • getPendingCallsInitalCapacity

      public int getPendingCallsInitalCapacity()
    • setPendingCallsInitalCapacity

      public void setPendingCallsInitalCapacity(int pendingCallsInitalCapacity)
    • getPendingCallsConcurrencyLevel

      public int getPendingCallsConcurrencyLevel()
    • setPendingCallsConcurrencyLevel

      public void setPendingCallsConcurrencyLevel(int pendingCallsConcurrencyLevel)
    • getReservedStreamsInitalCapacity

      public int getReservedStreamsInitalCapacity()
    • setReservedStreamsInitalCapacity

      public void setReservedStreamsInitalCapacity(int reservedStreamsInitalCapacity)
    • getReservedStreamsConcurrencyLevel

      public int getReservedStreamsConcurrencyLevel()
    • setReservedStreamsConcurrencyLevel

      public void setReservedStreamsConcurrencyLevel(int reservedStreamsConcurrencyLevel)
    • setExecutorQueueSizeToDropAudioPackets

      public void setExecutorQueueSizeToDropAudioPackets(Integer executorQueueSizeToDropAudioPackets)
      Specify the size of queue that will trigger audio packet dropping, disabled if it's 0
      Parameters:
      executorQueueSizeToDropAudioPackets - queue size
    • getProtocol

      public String getProtocol()
      Description copied from interface: IConnection
      Returns the protocol type for this connection. eg. rtmp, rtmpt, http
      Specified by:
      getProtocol in interface IConnection
      Returns:
      protocol type
    • toString

      public String toString()
      Overrides:
      toString in class Object