org.red5.server.net.rtmpt
Class BaseRTMPTConnection
java.lang.Object
org.red5.server.AttributeStore
org.red5.server.BaseConnection
org.red5.server.net.rtmp.RTMPConnection
org.red5.server.net.rtmpt.BaseRTMPTConnection
- All Implemented Interfaces:
- IEventDispatcher, IEventHandler, IEventListener, IAttributeStore, ICastingAttributeStore, IConnection, ICoreObject, IServiceCapableConnection, IStreamCapableConnection, AttributeStoreMXBean
- Direct Known Subclasses:
- RTMPTClientConnection, RTMPTConnection
public abstract class BaseRTMPTConnection
- extends RTMPConnection
Fields inherited from class org.red5.server.BaseConnection |
basicScopes, client, closed, droppedMessages, host, params, path, readMessages, remoteAddress, remoteAddresses, remotePort, scope, sessionId, type, writtenMessages |
Methods inherited from class org.red5.server.net.rtmp.RTMPConnection |
addClientStream, closeChannel, connect, createOutputStream, createStreamName, deleteStreamById, equals, getChannel, getClientBytesRead, getEncoding, getId, getInvokeId, getLastPingTime, getNextAvailableChannelId, getPendingCall, getPendingVideoMessages, getState, getStateCode, getStreamByChannelId, getStreamById, getStreamIdForChannel, getStreams, getUsedStreamCount, hashCode, invoke, invoke, invoke, invoke, invoke, invoke, isChannelUsed, messageDropped, messageReceived, messageSent, newBroadcastStream, newPlaylistSubscriberStream, newSingleItemSubscriberStream, notify, notify, notify, notify, onInactive, ping, ping, pingReceived, receivedBytesRead, registerDeferredResult, registerPendingCall, rememberStreamBufferDuration, removeClientStream, reserveStreamId, retrievePendingCall, sendPendingServiceCallsCloseError, setId, setMaxHandshakeTimeout, setMaxInactivity, setPingInterval, setSchedulingService, setState, setStateCode, setup, startRoundTripMeasurement, startWaitForHandshake, toString, unregisterDeferredResult, unreserveStreamId, updateBytesRead, writingMessage |
Methods inherited from class org.red5.server.BaseConnection |
connect, dispatchEvent, getBasicScopes, getClient, getConnectParams, getDroppedMessages, getHost, getNextClientId, getPath, getReadLock, getReadMessages, getRemoteAddress, getRemoteAddresses, getRemotePort, getScope, getSessionId, getType, getWriteLock, getWrittenMessages, handleEvent, initialize, isConnected, notifyEvent, registerBasicScope, unregisterBasicScope |
Methods inherited from class org.red5.server.AttributeStore |
filterNull, getAttribute, getAttribute, getAttributeNames, getAttributes, getBoolAttribute, getByteAttribute, getDoubleAttribute, getIntAttribute, getListAttribute, getLongAttribute, getMapAttribute, getSetAttribute, getShortAttribute, getStringAttribute, hasAttribute, removeAttribute, removeAttributes, setAttribute, setAttributes, setAttributes |
Methods inherited from interface org.red5.server.api.IConnection |
connect, getBasicScopes, getClient, getConnectParams, getDroppedMessages, getHost, getPath, getReadMessages, getRemoteAddress, getRemoteAddresses, getRemotePort, getScope, getSessionId, getType, getWrittenMessages, initialize, isConnected |
BaseRTMPTConnection
public BaseRTMPTConnection(String type)
getPendingMessages
public abstract 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()
- Closes connection
- 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
rawWrite
public void rawWrite(IoBuffer packet)
- Send raw data down the connection.
- Specified by:
rawWrite
in class RTMPConnection
- Parameters:
packet
- the buffer containing the raw data
getReadBytes
public long getReadBytes()
- Total number of bytes read from the connection.
- Specified by:
getReadBytes
in interface IConnection
- Overrides:
getReadBytes
in class RTMPConnection
- Returns:
- bytes read
getWrittenBytes
public long getWrittenBytes()
- Total number of bytes written to the connection.
- Specified by:
getWrittenBytes
in interface IConnection
- Overrides:
getWrittenBytes
in class RTMPConnection
- Returns:
- bytes written
getPendingMessages
public long getPendingMessages()
- Total number of messages that are pending to be sent to the connection.
- Specified by:
getPendingMessages
in interface IConnection
- Overrides:
getPendingMessages
in class BaseConnection
- Returns:
- pending messages
decode
public List<?> decode(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 IoBuffer foldPendingMessages(int targetSize)
setHandler
public void setHandler(IRTMPHandler handler)
setDecoder
public void setDecoder(RTMPProtocolDecoder decoder)
setEncoder
public void setEncoder(RTMPProtocolEncoder encoder)
Copyright © 2006-2010 The Red5 Project