Package org.red5.client.net.rtmpe
Class RTMPEClient
java.lang.Object
org.red5.server.net.rtmp.BaseRTMPHandler
org.red5.client.net.rtmp.BaseRTMPClientHandler
org.red5.client.net.rtmp.RTMPClient
org.red5.client.net.rtmpe.RTMPEClient
- All Implemented Interfaces:
ClientExceptionHandler,INetStreamEventHandler,IRTMPClient,IEventDispatcher,IConsumer,IMessageComponent,IPipeConnectionListener,IPushableConsumer,IRTMPHandler,Constants,StatusCodes
public class RTMPEClient
extends RTMPClient
implements INetStreamEventHandler, ClientExceptionHandler, IEventDispatcher, IPushableConsumer, IPipeConnectionListener
RTMPE client object based on the original RTMP client.
- Author:
- Paul Gregoire, Gavriloaie Eugen-Andrei
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.red5.server.net.rtmp.message.Constants
Constants.DataType -
Field Summary
Fields inherited from class org.red5.client.net.rtmp.RTMPClient
CONNECTOR_WORKER_TIMEOUT, future, ioHandler, session, socketConnectorFields inherited from class org.red5.client.net.rtmp.BaseRTMPClientHandler
bandwidthCheckDone, conn, connectionParams, executor, protocol, subscribedFields inherited from class org.red5.server.net.rtmp.BaseRTMPHandler
isDebug, isTrace, logFields inherited from interface org.red5.server.net.rtmp.message.Constants
HANDSHAKE_SIZE, HEADER_CONTINUE, HEADER_NEW, HEADER_SAME_SOURCE, HEADER_TIMER_CHANGE, MEDIUM_INT_MAX, SO_CLIENT_CLEAR_DATA, SO_CLIENT_DELETE_DATA, SO_CLIENT_INITIAL_DATA, SO_CLIENT_SEND_MESSAGE, SO_CLIENT_STATUS, SO_CLIENT_UPDATE_ATTRIBUTE, SO_CLIENT_UPDATE_DATA, SO_CONNECT, SO_DELETE_ATTRIBUTE, SO_DISCONNECT, SO_SEND_MESSAGE, SO_SET_ATTRIBUTE, SOURCE_TYPE_LIVE, SOURCE_TYPE_VOD, TYPE_ABORT, TYPE_AGGREGATE, TYPE_AUDIO_DATA, TYPE_BYTES_READ, TYPE_CHUNK_SIZE, TYPE_CLIENT_BANDWIDTH, TYPE_EDGE_ORIGIN, TYPE_FLEX_MESSAGE, TYPE_FLEX_SHARED_OBJECT, TYPE_FLEX_STREAM_SEND, TYPE_INVOKE, TYPE_NOTIFY, TYPE_PING, TYPE_SERVER_BANDWIDTH, TYPE_SHARED_OBJECT, TYPE_STREAM_METADATA, TYPE_VIDEO_DATAFields inherited from interface org.red5.server.messaging.IPushableConsumer
KEYFields inherited from interface org.red5.server.net.rtmp.status.StatusCodes
APP_GC, APP_RESOURCE_LOWMEMORY, APP_SCRIPT_ERROR, APP_SCRIPT_WARNING, APP_SHUTDOWN, NC_CALL_BADVERSION, NC_CALL_FAILED, NC_CONNECT_APPSHUTDOWN, NC_CONNECT_CLOSED, NC_CONNECT_FAILED, NC_CONNECT_INVALID_APPLICATION, NC_CONNECT_RECONNECT_REQUEST, NC_CONNECT_REJECTED, NC_CONNECT_SUCCESS, NS_BUFFER_EMPTY, NS_CLEAR_FAILED, NS_CLEAR_SUCCESS, NS_DATA_START, NS_FAILED, NS_INVALID_ARGUMENT, NS_PAUSE_NOTIFY, NS_PLAY_COMPLETE, NS_PLAY_FAILED, NS_PLAY_FILE_STRUCTURE_INVALID, NS_PLAY_INSUFFICIENT_BW, NS_PLAY_NO_SUPPORTED_TRACK_FOUND, NS_PLAY_PUBLISHNOTIFY, NS_PLAY_RESET, NS_PLAY_START, NS_PLAY_STOP, NS_PLAY_STREAMNOTFOUND, NS_PLAY_SWITCH, NS_PLAY_TRANSITION, NS_PLAY_TRANSITION_COMPLETE, NS_PLAY_UNPUBLISHNOTIFY, NS_PUBLISH_BADNAME, NS_PUBLISH_START, NS_RECORD_FAILED, NS_RECORD_NOACCESS, NS_RECORD_START, NS_RECORD_STOP, NS_SEEK_FAILED, NS_SEEK_NOTIFY, NS_TRANSITION_FORCED, NS_TRANSITION_SUCCESS, NS_UNPAUSE_NOTIFY, NS_UNPUBLISHED_SUCCESS, SO_CREATION_FAILED, SO_NO_READ_ACCESS, SO_NO_WRITE_ACCESS, SO_PERSISTENCE_MISMATCH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClientListener(IClientListener clientListener) Adds a listener for receiving rtmp events.static ProxycreateProxy(RTMPEClient client, String host, int port, String app) Creates a proxy.static WritercreateWriter(RTMPEClient client) Creates a writer.voidDisconnect the first connection in the connection mapvoiddispatchEvent(IEvent event) Returns the filename if vod is being used.Returns the name of the stream being utilized.voidhandleException(Throwable throwable) Handle any exceptions that occur.voidonMetaData(Object object) Callback method fired when a MetadataEvent is detected.voidonOOBControlMessage(IMessageComponent source, IPipe pipe, OOBControlMessage oobCtrlMsg) voidvoidCallback method fired when a NetStatusEvent is detected.voidonStreamEvent(Notify notify) Callback method fired when a Notify or other stream event is detected.voidpushMessage(IPipe pipe, IMessage message) voidsetFileName(String fileName) Sets the filename for vod.voidsetStreamName(String streamName) Sets the name of the stream being utilized.Methods inherited from class org.red5.client.net.rtmp.RTMPClient
makeDefaultConnectionParams, setProtocol, startConnectorMethods inherited from class org.red5.client.net.rtmp.BaseRTMPClientHandler
connect, connect, connect, connect, connect, connectionClosed, connectionOpened, createStream, deleteStream, getChannelForStreamId, getConnection, getConnectionParams, getSharedObject, invoke, invoke, isBandwidthCheckDone, isSubscribed, isSwfVerification, onBWCheck, onBWCheck, onBWDone, onBWDone, onChunkSize, onClientBandwidth, onCommand, onPing, onServerBandwidth, onSharedObject, ping, play, play2, publish, publishStreamData, releaseStream, setConnection, setConnectionClosedHandler, setExceptionHandler, setServiceProvider, setStreamEventDispatcher, setStreamEventHandler, setSwfVerification, subscribe, unpublishMethods inherited from class org.red5.server.net.rtmp.BaseRTMPHandler
getHostname, handlePendingCallResult, messageReceived, messageSent, onStreamBytesRead
-
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:
disconnectin interfaceIRTMPClient- Overrides:
disconnectin classRTMPClient
-
handleException
Description copied from class:BaseRTMPClientHandlerHandle any exceptions that occur.- Specified by:
handleExceptionin interfaceClientExceptionHandler- Overrides:
handleExceptionin classBaseRTMPClientHandler- Parameters:
throwable- Exception thrown
-
addClientListener
Adds a listener for receiving rtmp events.- Parameters:
clientListener-
-
getStreamName
Returns the name of the stream being utilized.- Returns:
- the streamName
-
setStreamName
Sets the name of the stream being utilized.- Parameters:
streamName- the streamName to set
-
getFileName
Returns the filename if vod is being used.- Returns:
- the fileName
-
setFileName
Sets the filename for vod.- Parameters:
fileName- the fileName to set
-
onOOBControlMessage
- Specified by:
onOOBControlMessagein interfaceIMessageComponent
-
onPipeConnectionEvent
- Specified by:
onPipeConnectionEventin interfaceIPipeConnectionListener
-
pushMessage
- Specified by:
pushMessagein interfaceIPushableConsumer- Throws:
IOException
-
dispatchEvent
- Specified by:
dispatchEventin interfaceIEventDispatcher
-
onStatus
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
Callback method fired when a Notify or other stream event is detected.- Specified by:
onStreamEventin interfaceINetStreamEventHandler- Parameters:
notify-
-
onMetaData
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
Creates a proxy.- Parameters:
client-host- destination hostport- destination portapp- destination application- Returns:
- proxy
-
createWriter
Creates a writer.- Parameters:
client-- Returns:
- writer
-