Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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:
  AttributeStoreMBean, ConnectionMBean, IEventDispatcher, IEventHandler, IEventListener, IAttributeStore, ICastingAttributeStore, IConnection, ICoreObject, IServiceCapableConnection, IStreamCapableConnection

Direct Known Subclasses:
  RTMPTClientConnection, RTMPTConnection

    public abstract class BaseRTMPTConnection

extends RTMPConnection

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`

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()` Total number of messages that are pending to be sent to the connection.
`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` | `rawWrite(IoBuffer packet)` Send raw data down the connection.
`void` | `realClose()` Real close
`void` | `setDecoder(RTMPProtocolDecoder decoder)`
`void` | `setEncoder(RTMPProtocolEncoder encoder)`
`void` | `setHandler(IRTMPHandler handler)`
`void` | `write(Packet packet)` Send RTMP packet down the connection.

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, onInactive, 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`

Constructor Detail

### BaseRTMPTConnection

    public BaseRTMPTConnection(String type)

Method Detail

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2010 The Red5 Project