Class BaseRTMPTConnection

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

public abstract class BaseRTMPTConnection extends RTMPConnection
  • Field Details

    • clientSessionId

      protected String clientSessionId
      Clients session id, used to override the BaseConnection.sessionId for client implementations.
  • Constructor Details

    • BaseRTMPTConnection

      public BaseRTMPTConnection(String type)
  • Method Details

    • getPendingMessages

      public abstract org.apache.mina.core.buffer.IoBuffer getPendingMessages(int targetSize)
      Return any pending messages up to a given size.
      Parameters:
      targetSize - the size the resulting buffer should have
      Returns:
      a buffer containing the data to send or null if no messages are pending
    • close

      public void close()
      Specified by:
      close in interface IConnection
      Overrides:
      close in class RTMPConnection
    • isClosing

      public boolean isClosing()
      Getter for property 'closing'.
      Returns:
      Value for property 'closing'.
    • realClose

      public void realClose()
      Real close
    • writeRaw

      public void writeRaw(org.apache.mina.core.buffer.IoBuffer packet)
      Send raw data down the connection.
      Specified by:
      writeRaw in class RTMPConnection
      Parameters:
      packet - the buffer containing the raw data
    • getReadBytes

      public long getReadBytes()
      Specified by:
      getReadBytes in interface IConnection
      Overrides:
      getReadBytes in class RTMPConnection
    • getWrittenBytes

      public long getWrittenBytes()
      Specified by:
      getWrittenBytes in interface IConnection
      Overrides:
      getWrittenBytes in class RTMPConnection
    • getPendingMessages

      public long getPendingMessages()
      Specified by:
      getPendingMessages in interface IConnection
      Overrides:
      getPendingMessages in class BaseConnection
    • setSessionId

      public void setSessionId(String sessionId)
    • getSessionId

      public String getSessionId()
      Specified by:
      getSessionId in interface IConnection
      Overrides:
      getSessionId in class BaseConnection
    • decode

      public List<?> decode(org.apache.mina.core.buffer.IoBuffer data)
      Decode data sent by the client.
      Parameters:
      data - the data to decode
      Returns:
      a list of decoded objects
    • write

      public void write(Packet packet)
      Send RTMP packet down the connection.
      Specified by:
      write in class RTMPConnection
      Parameters:
      packet - the packet to send
    • foldPendingMessages

      protected org.apache.mina.core.buffer.IoBuffer foldPendingMessages(int targetSize)
    • setHandler

      public void setHandler(IRTMPHandler handler)
      Overrides:
      setHandler in class RTMPConnection
    • setDecoder

      public void setDecoder(RTMPProtocolDecoder decoder)
    • setEncoder

      public void setEncoder(RTMPProtocolEncoder encoder)