org.red5.server.net.rtmpt
Class RTMPTConnection

java.lang.Object
  extended by org.red5.server.AttributeStore
      extended by org.red5.server.BaseConnection
          extended by org.red5.server.net.rtmp.RTMPConnection
              extended by org.red5.server.net.rtmpt.BaseRTMPTConnection
                  extended by org.red5.server.net.rtmpt.RTMPTConnection
All Implemented Interfaces:
IEventDispatcher, IEventHandler, IEventListener, IAttributeStore, ICastingAttributeStore, IConnection, ICoreObject, IServiceCapableConnection, IStreamCapableConnection, AttributeStoreMXBean

public class RTMPTConnection
extends BaseRTMPTConnection

A RTMPT client / session.

Author:
The Red5 Project ([email protected]), Joachim Bauch ([email protected]), Paul Gregoire ([email protected])

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.red5.server.api.IConnection
IConnection.Encoding
 
Field Summary
 
Fields inherited from class org.red5.server.net.rtmpt.BaseRTMPTConnection
handler, maxInMessagesPerProcess, maxQueueOfferAttempts, maxQueueOfferTime, pendingInMessages, pendingOutMessages
 
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
 
Method Summary
 IoBuffer getPendingMessages(int targetSize)
          Return any pending messages up to a given size.
 byte getPollingDelay()
          Return the polling delay to use.
protected  IoSession getSession()
          Creates a DummySession for this HTTP-based connection to allow our Mina based system happy.
 boolean isReaderIdle()
          Returns whether or not the reader is idle.
 boolean isWriterIdle()
          Returns whether or not the writer is idle.
protected  void onInactive()
          Inactive state event handler.
 void realClose()
          Real close
 void setSchedulingService(ISchedulingService schedulingService)
          Sets the scheduling service.
protected  void setServlet(RTMPTServlet servlet)
          Set the servlet that created the connection.
 void setServletRequest(javax.servlet.http.HttpServletRequest request)
          Setter for servlet request.
 void setSessionId(String sessionId)
          Sets the client session id.
 
Methods inherited from class org.red5.server.net.rtmpt.BaseRTMPTConnection
close, decode, foldPendingMessages, getPendingMessages, getReadBytes, getWrittenBytes, isClosing, read, read, read, setDecoder, setEncoder, setHandler, setMaxInMessagesPerProcess, setMaxQueueOfferAttempts, setMaxQueueOfferTime, write, writeRaw
 
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, getTimer, getUsedStreamCount, hashCode, invoke, invoke, invoke, invoke, invoke, invoke, isChannelUsed, isValidStreamId, messageDropped, messageReceived, messageSent, newBroadcastStream, newPlaylistSubscriberStream, newSingleItemSubscriberStream, notify, notify, notify, notify, ping, ping, pingReceived, receivedBytesRead, registerDeferredResult, registerPendingCall, rememberStreamBufferDuration, removeClientStream, reserveStreamId, reserveStreamId, retrievePendingCall, sendPendingServiceCallsCloseError, sendSharedObjectMessage, setBandwidth, setId, setMaxHandshakeTimeout, setMaxInactivity, setPingInterval, setState, setStateCode, setup, startRoundTripMeasurement, startWaitForHandshake, status, status, toString, unregisterDeferredResult, unreserveStreamId, updateBytesRead, writingMessage
 
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, 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
 

Method Detail

getSession

protected IoSession getSession()
Creates a DummySession for this HTTP-based connection to allow our Mina based system happy.

Returns:
session

realClose

public void realClose()
Real close

Overrides:
realClose in class BaseRTMPTConnection

onInactive

protected void onInactive()
Inactive state event handler.

Specified by:
onInactive in class RTMPConnection

isReaderIdle

public boolean isReaderIdle()
Returns whether or not the reader is idle.

Overrides:
isReaderIdle in class BaseConnection
Returns:
queued messages

isWriterIdle

public boolean isWriterIdle()
Returns whether or not the writer is idle.

Overrides:
isWriterIdle in class BaseConnection
Returns:
queued messages

setSchedulingService

public void setSchedulingService(ISchedulingService schedulingService)
Sets the scheduling service.

Overrides:
setSchedulingService in class RTMPConnection
Parameters:
schedulingService - scheduling service

setSessionId

public void setSessionId(String sessionId)
Sets the client session id.

Parameters:
sessionId -

setServlet

protected void setServlet(RTMPTServlet servlet)
Set the servlet that created the connection.

Parameters:
servlet -

setServletRequest

public void setServletRequest(javax.servlet.http.HttpServletRequest request)
Setter for servlet request.

Parameters:
request - Servlet request

getPollingDelay

public byte getPollingDelay()
Return the polling delay to use.

Returns:
the polling delay

getPendingMessages

public IoBuffer getPendingMessages(int targetSize)
Return any pending messages up to a given size.

Specified by:
getPendingMessages in class BaseRTMPTConnection
Parameters:
targetSize - the size the resulting buffer should have
Returns:
a buffer containing the data to send or null if no messages are pending


Copyright © 2006-2012 The Red5 Project