|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.red5.server.AttributeStore
org.red5.server.BaseConnection
org.red5.server.net.rtmp.RTMPConnection
org.red5.server.net.rtmpt.BaseRTMPTConnection
public abstract class BaseRTMPTConnection
Base RTMPT client / session.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.red5.server.api.IConnection |
---|
IConnection.Encoding |
Field Summary | |
---|---|
protected IRTMPHandler |
handler
RTMP events handler |
protected int |
maxInMessagesPerProcess
Maximum incoming messages to process at a time per client |
protected int |
maxQueueOfferAttempts
Maximum offer attempts before failing on incoming or outgoing queues |
protected long |
maxQueueOfferTime
Maximum amount of time in milliseconds to wait before allowing an offer to fail |
protected LinkedBlockingQueue<Object> |
pendingInMessages
List of pending incoming messages |
protected LinkedBlockingQueue<org.red5.server.net.rtmpt.BaseRTMPTConnection.PendingData> |
pendingOutMessages
List of pending outgoing messages |
Fields inherited from class org.red5.server.net.rtmp.RTMPConnection |
---|
bytesReadInterval, clientId, limitType, nextBytesRead, RTMP_CONNECTION_KEY, RTMP_ENCRYPTED, RTMP_HANDSHAKE, RTMP_NON_ENCRYPTED, RTMPE_CIPHER_IN, RTMPE_CIPHER_OUT, schedulingService, state |
Fields inherited from class org.red5.server.BaseConnection |
---|
basicScopes, client, closed, connectionListeners, droppedMessages, host, params, path, readMessages, remoteAddress, remoteAddresses, remotePort, scope, sessionId, type, writtenMessages |
Fields inherited from class org.red5.server.AttributeStore |
---|
attributes |
Fields inherited from interface org.red5.server.api.IConnection |
---|
PERSISTENT, POLLING, TRANSIENT |
Constructor Summary | |
---|---|
BaseRTMPTConnection(String type)
|
Method Summary | |
---|---|
void |
close()
Closes connection |
List<?> |
decode(IoBuffer data)
Decode data sent by the client. |
protected IoBuffer |
foldPendingMessages(int targetSize)
|
long |
getPendingMessages()
Count of outgoing messages not yet written. |
abstract IoBuffer |
getPendingMessages(int targetSize)
Return any pending messages up to a given size. |
long |
getReadBytes()
Total number of bytes read from the connection. |
long |
getWrittenBytes()
Total number of bytes written to the connection. |
boolean |
isClosing()
Getter for property 'closing'. |
void |
read(IoBuffer ioBuffer)
Receive RTMP IoBuffer from the connection. |
void |
read(List<?> messages)
Receive a collection of RTMP messages. |
void |
read(Packet packet)
Receive RTMP packet from the connection. |
void |
realClose()
Real close |
void |
setDecoder(RTMPProtocolDecoder decoder)
|
void |
setEncoder(RTMPProtocolEncoder encoder)
|
void |
setHandler(IRTMPHandler handler)
|
void |
setMaxInMessagesPerProcess(int maxInMessagesPerProcess)
|
void |
setMaxQueueOfferAttempts(int maxQueueOfferAttempts)
|
void |
setMaxQueueOfferTime(long maxQueueOfferTime)
|
void |
write(Packet packet)
Send RTMP packet down the connection. |
void |
writeRaw(IoBuffer packet)
Send raw data down the connection. |
Methods inherited from class org.red5.server.BaseConnection |
---|
addListener, connect, dispatchEvent, getBasicScopes, getClient, getConnectParams, getDroppedMessages, getHost, getLock, getNextClientId, getPath, getReadMessages, getRemoteAddress, getRemoteAddresses, getRemotePort, getScope, getSessionId, getType, getWrittenMessages, handleEvent, initialize, isConnected, isReaderIdle, isWriterIdle, notifyEvent, registerBasicScope, removeListener, unregisterBasicScope |
Methods inherited from class org.red5.server.AttributeStore |
---|
filterNull, from, getAttribute, getAttribute, getAttributeNames, getAttributes, getBoolAttribute, getByteAttribute, getDoubleAttribute, getIntAttribute, getListAttribute, getLongAttribute, getMapAttribute, getSetAttribute, getShortAttribute, getStringAttribute, hasAttribute, removeAttribute, removeAttributes, setAttribute, setAttributes, setAttributes, size |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.red5.server.api.IConnection |
---|
addListener, connect, getBasicScopes, getClient, getConnectParams, getDroppedMessages, getHost, getPath, getReadMessages, getRemoteAddress, getRemoteAddresses, getRemotePort, getScope, getSessionId, getType, getWrittenMessages, initialize, isConnected, removeListener |
Methods inherited from interface org.red5.server.api.event.IEventDispatcher |
---|
dispatchEvent |
Methods inherited from interface org.red5.server.api.event.IEventHandler |
---|
handleEvent |
Methods inherited from interface org.red5.server.api.event.IEventListener |
---|
notifyEvent |
Methods inherited from interface org.red5.server.api.ICastingAttributeStore |
---|
getBoolAttribute, getByteAttribute, getDoubleAttribute, getIntAttribute, getListAttribute, getLongAttribute, getMapAttribute, getSetAttribute, getShortAttribute, getStringAttribute |
Methods inherited from interface org.red5.server.api.IAttributeStore |
---|
getAttribute, getAttribute, getAttributeNames, getAttributes, hasAttribute, removeAttribute, removeAttributes, setAttribute, setAttributes, setAttributes, size |
Field Detail |
---|
protected IRTMPHandler handler
protected volatile LinkedBlockingQueue<Object> pendingInMessages
protected volatile LinkedBlockingQueue<org.red5.server.net.rtmpt.BaseRTMPTConnection.PendingData> pendingOutMessages
protected int maxInMessagesPerProcess
protected long maxQueueOfferTime
protected int maxQueueOfferAttempts
Constructor Detail |
---|
public BaseRTMPTConnection(String type)
Method Detail |
---|
public abstract IoBuffer getPendingMessages(int targetSize)
targetSize
- the size the resulting buffer should have
public void close()
close
in interface IConnection
close
in class RTMPConnection
public boolean isClosing()
public void realClose()
public long getReadBytes()
getReadBytes
in interface IConnection
getReadBytes
in class RTMPConnection
public long getWrittenBytes()
getWrittenBytes
in interface IConnection
getWrittenBytes
in class RTMPConnection
public long getPendingMessages()
getPendingMessages
in interface IConnection
getPendingMessages
in class BaseConnection
public List<?> decode(IoBuffer data)
data
- the data to decode
public void read(List<?> messages)
messages
- public void read(IoBuffer ioBuffer)
ioBuffer
- the I/O buffer to receivepublic void read(Packet packet)
packet
- the packet to receivepublic void write(Packet packet)
write
in class RTMPConnection
packet
- the packet to sendpublic void writeRaw(IoBuffer packet)
writeRaw
in class RTMPConnection
packet
- the buffer containing the raw dataprotected IoBuffer foldPendingMessages(int targetSize)
public void setHandler(IRTMPHandler handler)
public void setDecoder(RTMPProtocolDecoder decoder)
public void setEncoder(RTMPProtocolEncoder encoder)
public void setMaxInMessagesPerProcess(int maxInMessagesPerProcess)
maxInMessagesPerProcess
- the maxInMessagesPerProcess to setpublic void setMaxQueueOfferTime(long maxQueueOfferTime)
maxQueueOfferTime
- the maxQueueOfferTime to setpublic void setMaxQueueOfferAttempts(int maxQueueOfferAttempts)
maxQueueOfferAttempts
- the maxQueueOfferAttempts to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |