Package org.red5.client.net.rtmpt
Class BaseRTMPTConnection
java.lang.Object
org.red5.server.AttributeStore
org.red5.server.BaseConnection
org.red5.server.net.rtmp.RTMPConnection
org.red5.client.net.rtmpt.BaseRTMPTConnection
- All Implemented Interfaces:
IEventDispatcher,IEventHandler,IEventListener,IAttributeStore,ICastingAttributeStore,IConnection,ICoreObject,IServiceCapableConnection,IStreamCapableConnection,AttributeStoreMXBean
- Direct Known Subclasses:
RTMPTClientConnection
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.red5.server.api.IConnection
IConnection.Duty, IConnection.Encoding, IConnection.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringClients session id, used to override the BaseConnection.sessionId for client implementations.Fields inherited from class org.red5.server.net.rtmp.RTMPConnection
bytesReadInterval, channels, clientBytesRead, decoderLock, decoderState, deferredResults, encoderLock, executor, keepAliveTask, lastPingRoundTripTime, lastPingSentOn, lastPongReceivedOn, limitType, MAX_RESERVED_STREAMS, maxHandlingTimeout, maxInactivity, nextBytesRead, packetSequence, pendingCalls, pendingVideos, pingInterval, receivedPacketExecutor, receivedPacketFuture, receivedPacketQueue, receivedQueueSize, reservedStreams, RTMP_BUFFER, RTMP_CONN_MANAGER, RTMP_ENCRYPTED, RTMP_ENCRYPTED_BLOWFISH, RTMP_ENCRYPTED_UNK, RTMP_ENCRYPTED_XTEA, RTMP_HANDLER, RTMP_HANDSHAKE, RTMP_NON_ENCRYPTED, RTMP_SESSION_ID, RTMPE_CIPHER_IN, RTMPE_CIPHER_OUT, running, scheduler, state, streams, timer, transactionId, waitForHandshakeTaskFields inherited from class org.red5.server.BaseConnection
basicScopes, client, connectionListeners, droppedMessages, duty, host, params, path, readMessages, remoteAddress, remoteAddresses, remotePort, scope, sessionId, type, writtenMessagesFields inherited from class org.red5.server.AttributeStore
attributes, isDebug, isTrace -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()List<?> decode(org.apache.mina.core.buffer.IoBuffer data) Decode data sent by the client.protected org.apache.mina.core.buffer.IoBufferfoldPendingMessages(int targetSize) longabstract org.apache.mina.core.buffer.IoBuffergetPendingMessages(int targetSize) Return any pending messages up to a given size.longlongbooleanGetter for property 'closing'.voidReal closevoidsetDecoder(RTMPProtocolDecoder decoder) voidsetEncoder(RTMPProtocolEncoder encoder) voidsetHandler(IRTMPHandler handler) voidsetSessionId(String sessionId) voidSend RTMP packet down the connection.voidwriteRaw(org.apache.mina.core.buffer.IoBuffer packet) Send raw data down the connection.Methods inherited from class org.red5.server.net.rtmp.RTMPConnection
addClientStream, closeChannel, connect, createOutputStream, createStreamName, currentQueueSize, deleteStreamById, dispatchEvent, getChannel, getChannelIdForStreamId, getChannelsConcurrencyLevel, getChannelsInitalCapacity, getClientBytesRead, getDeadlockGuardScheduler, getDecoderLock, getDecoderState, getEncoderLock, getEncoding, getExecutor, getHandler, getIoSession, getLastPingSentAndLastPongReceivedInterval, getLastPingTime, getMaxHandlingTimeout, getMaxPollTimeout, getNextAvailableChannelId, getPendingCall, getPendingCallsConcurrencyLevel, getPendingCallsInitalCapacity, getPendingVideoMessages, getProtocol, getReservedStreamsConcurrencyLevel, getReservedStreamsInitalCapacity, getScheduler, getState, getStateCode, getStreamByChannelId, getStreamById, getStreamIdForChannelId, getStreams, getStreamsConcurrencyLevel, getStreamsInitalCapacity, getStreamsMap, getTimer, getTransactionId, getUsedStreamCount, handleMessageReceived, invoke, invoke, invoke, invoke, invoke, invoke, isChannelUsed, isConnected, isDisconnected, isEncrypted, isIdle, isValidStreamId, messageDropped, messageReceived, messageSent, messageTypeToName, newBroadcastStream, newPlaylistSubscriberStream, newSingleItemSubscriberStream, notify, notify, notify, notify, onInactive, open, ping, ping, pingReceived, receivedBytesRead, registerDeferredResult, registerPendingCall, rememberStreamBufferDuration, removeClientStream, reserveStreamId, reserveStreamId, retrievePendingCall, sendPendingServiceCallsCloseError, sendSharedObjectMessage, setBandwidth, setChannelsConcurrencyLevel, setChannelsInitalCapacity, setDeadlockGuardScheduler, setEncrypted, setExecutor, setExecutorQueueSizeToDropAudioPackets, setMaxHandlingTimeout, setMaxHandshakeTimeout, setMaxInactivity, setMaxPollTimeout, setPendingCallsConcurrencyLevel, setPendingCallsInitalCapacity, setPingInterval, setReservedStreamsConcurrencyLevel, setReservedStreamsInitalCapacity, setScheduler, setStateCode, setStreamsConcurrencyLevel, setStreamsInitalCapacity, setup, startWaitForHandshake, status, status, toString, unregisterDeferredResult, unreserveStreamId, updateBytesRead, writingMessageMethods inherited from class org.red5.server.BaseConnection
addListener, connect, disconnect, equals, getBasicScopes, getClient, getConnectParams, getDroppedMessages, getDuty, getHost, getId, getLock, getPath, getReadMessages, getRemoteAddress, getRemoteAddresses, getRemotePort, getScope, getStreamId, getType, getWrittenMessages, handleEvent, hashCode, initialize, isClosed, isReaderIdle, isWriterIdle, notifyEvent, notifyPropertyChanged, registerBasicScope, registerBasicScope, removeListener, setClient, setDuty, setId, setStreamId, uninitialize, unregisterBasicScopeMethods inherited from class org.red5.server.AttributeStore
filterNull, from, getAttribute, getAttribute, getAttribute, getAttributeNames, getAttributes, getBoolAttribute, getByteAttribute, getDoubleAttribute, getIntAttribute, getListAttribute, getLongAttribute, getMapAttribute, getSetAttribute, getShortAttribute, getStringAttribute, hasAttribute, hasAttribute, removeAttribute, removeAttribute, removeAttributes, setAttribute, setAttribute, setAttributes, setAttributes, sizeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.red5.server.api.IAttributeStore
getAttribute, getAttribute, getAttribute, getAttributeNames, getAttributes, hasAttribute, hasAttribute, removeAttribute, removeAttribute, removeAttributes, setAttribute, setAttribute, setAttributes, setAttributes, sizeMethods inherited from interface org.red5.server.api.ICastingAttributeStore
getBoolAttribute, getByteAttribute, getDoubleAttribute, getIntAttribute, getListAttribute, getLongAttribute, getMapAttribute, getSetAttribute, getShortAttribute, getStringAttributeMethods inherited from interface org.red5.server.api.IConnection
addListener, connect, getBasicScopes, getClient, getConnectParams, getDroppedMessages, getDuty, getHost, getPath, getReadMessages, getRemoteAddress, getRemoteAddresses, getRemotePort, getScope, getStreamId, getType, getWrittenMessages, initialize, notifyPropertyChanged, removeListener, setClient, setStreamId, uninitializeMethods inherited from interface org.red5.server.api.event.IEventHandler
handleEventMethods inherited from interface org.red5.server.api.event.IEventListener
notifyEvent
-
Field Details
-
clientSessionId
Clients session id, used to override the BaseConnection.sessionId for client implementations.
-
-
Constructor Details
-
BaseRTMPTConnection
-
-
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:
closein interfaceIConnection- Overrides:
closein classRTMPConnection
-
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:
writeRawin classRTMPConnection- Parameters:
packet- the buffer containing the raw data
-
getReadBytes
public long getReadBytes()- Specified by:
getReadBytesin interfaceIConnection- Overrides:
getReadBytesin classRTMPConnection
-
getWrittenBytes
public long getWrittenBytes()- Specified by:
getWrittenBytesin interfaceIConnection- Overrides:
getWrittenBytesin classRTMPConnection
-
getPendingMessages
public long getPendingMessages()- Specified by:
getPendingMessagesin interfaceIConnection- Overrides:
getPendingMessagesin classBaseConnection
-
setSessionId
-
getSessionId
- Specified by:
getSessionIdin interfaceIConnection- Overrides:
getSessionIdin classBaseConnection
-
decode
Decode data sent by the client.- Parameters:
data- the data to decode- Returns:
- a list of decoded objects
-
write
Send RTMP packet down the connection.- Specified by:
writein classRTMPConnection- Parameters:
packet- the packet to send
-
foldPendingMessages
protected org.apache.mina.core.buffer.IoBuffer foldPendingMessages(int targetSize) -
setHandler
- Overrides:
setHandlerin classRTMPConnection
-
setDecoder
-
setEncoder
-