## org.red5.server.net.rtmpt
Class RTMPTConnection

    java.lang.Object
      org.red5.server.AttributeStore
          org.red5.server.BaseConnection
              org.red5.server.net.rtmp.RTMPConnection
                  org.red5.server.net.rtmpt.BaseRTMPTConnection
                      org.red5.server.net.rtmpt.RTMPTConnection

All Implemented Interfaces:
  AttributeStoreMBean, ConnectionMBean, IEventDispatcher, IEventHandler, IEventListener, IAttributeStore, ICastingAttributeStore, IConnection, ICoreObject, IServiceCapableConnection, IStreamCapableConnection

    public class RTMPTConnection

extends BaseRTMPTConnection

A RTMPT client / session.

Author:
  The Red5 Project (red5@osflash.org), Joachim Bauch (jojo@struktur.de)

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.rtmp.RTMPConnection
`bytesReadInterval, clientId, nextBytesRead, RTMP_CONNECTION_KEY, RTMP_ENCRYPTED, RTMP_HANDSHAKE, RTMP_NON_ENCRYPTED, state`

Fields inherited from class org.red5.server.BaseConnection
`basicScopes, client, closed, 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 void` `onInactive()` Inactive state event handler.
`void` `realClose()` Real close
`protected void` `setServlet(RTMPTServlet servlet)` Set the servlet that created the connection.
`void` `setServletRequest(javax.servlet.http.HttpServletRequest request)` Setter for servlet request.

Methods inherited from class org.red5.server.net.rtmpt.BaseRTMPTConnection
`close, decode, foldPendingMessages, getPendingMessages, getReadBytes, getWrittenBytes, isClosing, rawWrite, setDecoder, setEncoder, setHandler, write`

Methods inherited from class org.red5.server.net.rtmp.RTMPConnection

`addClientStream, closeChannel, connect, createOutputStream, createStreamName, deleteStreamById, getChannel, getClientBytesRead, getEncoding, getId, getInvokeId, getLastPingTime, getNextAvailableChannelId, getPendingCall, getPendingVideoMessages, getState, getStateCode, getStreamByChannelId, getStreamById, getStreamIdForChannel, getStreams, getUsedStreamCount, invoke, invoke, invoke, invoke, invoke, invoke, isChannelUsed, messageDropped, messageReceived, messageSent, newBroadcastStream, newPlaylistSubscriberStream, newSingleItemSubscriberStream, notify, notify, notify, notify, ping, ping, pingReceived, receivedBytesRead, registerDeferredResult, registerPendingCall, rememberStreamBufferDuration, removeClientStream, reserveStreamId, retrievePendingCall, 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, 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 class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

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`

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`

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`

Method Detail

### setServlet

    protected void setServlet(RTMPTServlet servlet)

  Set the servlet that created the connection.

  Parameters:
    `servlet` -

### 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`

### 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-2010 The Red5 Project