Class RTMPConnection

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

public abstract class RTMPConnection extends BaseConnection implements IStreamCapableConnection, IServiceCapableConnection
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

    • RTMP_SESSION_ID

      public static final String RTMP_SESSION_ID
      See Also:
    • RTMP_HANDSHAKE

      public static final String RTMP_HANDSHAKE
      See Also:
    • RTMP_BUFFER

      public static final String RTMP_BUFFER
      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:
    • channels

      protected transient ConcurrentMap<Integer,Channel> channels
      Connection channels
      See Also:
    • streams

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

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

      protected volatile int receivedQueueSize
      Received packet queue size
    • transactionId

      protected AtomicInteger transactionId
      Transaction identifier for remote commands.
    • pendingCalls

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

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

      protected AtomicInteger lastPingRoundTripTime
      Last ping round trip time
    • lastPingSentOn

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

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

      protected transient IRTMPHandler handler
      RTMP events handler
    • pingInterval

      protected 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

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

      protected transient ConcurrentMap<Number,AtomicInteger> pendingVideos
      Map for pending video packets keyed by stream id.
    • 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 org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler scheduler
      Scheduling service
    • executor

      protected transient org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor executor
      Thread pool for message handling.
    • running

      protected final AtomicBoolean running
      Keep-alive worker flag
    • timer

      protected final AtomicInteger timer
      Timestamp generator
    • closing

      protected final AtomicBoolean closing
      Closing flag
    • packetSequence

      protected final AtomicLong packetSequence
      Packet sequence number
    • waitForHandshakeTask

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

      protected ScheduledFuture<?> keepAliveTask
      Keep alive task.
    • receivedPacketExecutor

      protected transient ExecutorService receivedPacketExecutor
      Executor for received RTMP messages.
    • receivedPacketFuture

      protected transient Future<?> receivedPacketFuture
      Future which takes packets from the queue and passes them to the handler.
    • receivedPacketQueue

      protected volatile LinkedTransferQueue<Packet> receivedPacketQueue
      Queue for received RTMP packets. This is a transfer queue from which packets are passed to a handler.
  • Constructor Details

    • RTMPConnection

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

    • setHandler

      public void setHandler(IRTMPHandler handler)
    • getHandler

      public IRTMPHandler getHandler()
    • getState

      public RTMP getState()
    • getStateCode

      public byte getStateCode()
    • setStateCode

      public void setStateCode(byte stateCode)
      Sets the state by code and fires property chanage notifications.
      Parameters:
      stateCode -
    • getIoSession

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

      public void setEncrypted(boolean encrypted)
    • isEncrypted

      public boolean isEncrypted()
    • 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.
    • 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.
      Overrides:
      isIdle in class BaseConnection
      Returns:
      true if max idle period has been exceeded, false otherwise
    • isConnected

      public boolean isConnected()
      Check whether connection is alive
      Specified by:
      isConnected in interface IConnection
      Overrides:
      isConnected in class BaseConnection
      Returns:
      true if connection is scope bound and state is not DISCONNECTED, false otherwise
    • isDisconnected

      public boolean isDisconnected()
      Returns whether or not the connection is disconnected.
      Overrides:
      isDisconnected in class BaseConnection
      Returns:
      true if connection is not scope bound and state is 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:
    • close

      public void close()
      Closes connection
      Specified by:
      close in interface IConnection
      Overrides:
      close in class BaseConnection
    • 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.
    • messageTypeToName

      public String messageTypeToName(byte headerDataType)
    • handleMessageReceived

      public void handleMessageReceived(Packet packet)
      Handle the incoming message.
      Parameters:
      packet - incoming message packet
    • 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
    • sendSharedObjectMessage

      public void sendSharedObjectMessage(String name, int currentVersion, boolean persistent, Set<ISharedObjectEvent> events)
      Send a shared object message.
      Parameters:
      name - shared object name
      currentVersion - the current version
      persistent - toggle
      events - shared object events
    • 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(org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler scheduler)
      Sets the scheduler.
      Parameters:
      scheduler - scheduling service / thread executor
    • getScheduler

      public org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler getScheduler()
      Returns:
      the scheduler
    • getExecutor

      public org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor getExecutor()
    • setExecutor

      public void setExecutor(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor executor)
    • getDeadlockGuardScheduler

      @Deprecated(since="1.3.29", forRemoval=true) public org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler getDeadlockGuardScheduler()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Thread pool for guarding deadlocks
      Returns:
      the deadlockGuardScheduler
    • setDeadlockGuardScheduler

      @Deprecated(since="1.3.29", forRemoval=true) public void setDeadlockGuardScheduler(org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler deadlockGuardScheduler)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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)
    • getMaxPollTimeout

      public long getMaxPollTimeout()
    • setMaxPollTimeout

      public void setMaxPollTimeout(long maxPollTimeout)
    • 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

      @Deprecated(since="1.3.29", forRemoval=true) public void setExecutorQueueSizeToDropAudioPackets(Integer executorQueueSizeToDropAudioPackets)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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