Class RTMPEClient

All Implemented Interfaces:
ClientExceptionHandler, INetStreamEventHandler, IRTMPClient, IEventDispatcher, IConsumer, IMessageComponent, IPipeConnectionListener, IPushableConsumer, IRTMPHandler, Constants, StatusCodes

RTMPE client object based on the original RTMP client.
Author:
Paul Gregoire, Gavriloaie Eugen-Andrei
  • Constructor Details

    • RTMPEClient

      public RTMPEClient()
      Constructs a new RTMPEClient
  • Method Details

    • disconnect

      public void disconnect()
      Disconnect the first connection in the connection map
      Specified by:
      disconnect in interface IRTMPClient
      Overrides:
      disconnect in class RTMPClient
    • handleException

      public void handleException(Throwable throwable)
      Description copied from class: BaseRTMPClientHandler
      Handle any exceptions that occur.
      Specified by:
      handleException in interface ClientExceptionHandler
      Overrides:
      handleException in class BaseRTMPClientHandler
      Parameters:
      throwable - Exception thrown
    • addClientListener

      public void addClientListener(IClientListener clientListener)
      Adds a listener for receiving rtmp events.
      Parameters:
      clientListener -
    • getStreamName

      public String getStreamName()
      Returns the name of the stream being utilized.
      Returns:
      the streamName
    • setStreamName

      public void setStreamName(String streamName)
      Sets the name of the stream being utilized.
      Parameters:
      streamName - the streamName to set
    • getFileName

      public String getFileName()
      Returns the filename if vod is being used.
      Returns:
      the fileName
    • setFileName

      public void setFileName(String fileName)
      Sets the filename for vod.
      Parameters:
      fileName - the fileName to set
    • onOOBControlMessage

      public void onOOBControlMessage(IMessageComponent source, IPipe pipe, OOBControlMessage oobCtrlMsg)
      Specified by:
      onOOBControlMessage in interface IMessageComponent
    • onPipeConnectionEvent

      public void onPipeConnectionEvent(PipeConnectionEvent event)
      Specified by:
      onPipeConnectionEvent in interface IPipeConnectionListener
    • pushMessage

      public void pushMessage(IPipe pipe, IMessage message) throws IOException
      Specified by:
      pushMessage in interface IPushableConsumer
      Throws:
      IOException
    • dispatchEvent

      public void dispatchEvent(IEvent event)
      Specified by:
      dispatchEvent in interface IEventDispatcher
    • onStatus

      public void onStatus(Object status)
      Callback method fired when a NetStatusEvent is detected.
      invalid @link
      {@link http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/NetStatusEvent.html
      }
      Parameters:
      status -
    • onStreamEvent

      public void onStreamEvent(Notify notify)
      Callback method fired when a Notify or other stream event is detected.
      Specified by:
      onStreamEvent in interface INetStreamEventHandler
      Parameters:
      notify -
    • onMetaData

      public void onMetaData(Object object)
      Callback method fired when a MetadataEvent is detected.
      invalid @link
      {@link http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/events/MetadataEvent.html
      }
      invalid @link
      {@link http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/VideoDisplay.html#metadata
      }
      Parameters:
      object - metadata from a stream.
    • createProxy

      public static Proxy createProxy(RTMPEClient client, String host, int port, String app)
      Creates a proxy.
      Parameters:
      client -
      host - destination host
      port - destination port
      app - destination application
      Returns:
      proxy
    • createWriter

      public static Writer createWriter(RTMPEClient client)
      Creates a writer.
      Parameters:
      client -
      Returns:
      writer