org.red5.server.api.stream

## Interface IStreamCapableConnection

All Superinterfaces:
  AttributeStoreMXBean, IAttributeStore, ICastingAttributeStore, IConnection, ICoreObject, IEventDispatcher, IEventHandler, IEventListener

All Known Implementing Classes:
  BaseRTMPTConnection, RTMPConnection, RTMPMinaConnection, RTMPTConnection

    public interface IStreamCapableConnection
    extends IConnection

A connection that supports streaming.

Author:
  The Red5 Project (red5@osflash.org), Luke Hubbard (luke@codegent.com), Steven Gong (steven.gong@gmail.com)

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.red5.server.api.IConnection

`IConnection.Encoding`

### Field Summary

### Fields inherited from interface org.red5.server.api.IConnection

`PERSISTENT, POLLING, TRANSIENT`

### Method Summary

Methods
`void` `deleteStreamById(int streamId)` Deletes the stream with the given id.
`long` `getPendingVideoMessages(int streamId)` Total number of video messages that are pending to be sent to a stream.
`IClientStream` `getStreamById(int streamId)` Get a stream by its id.
`IClientBroadcastStream` `newBroadcastStream(int streamId)` Create a broadcast stream.
`IPlaylistSubscriberStream` `newPlaylistSubscriberStream(int streamId)` Create a stream that can play a list.
`ISingleItemSubscriberStream` `newSingleItemSubscriberStream(int streamId)` Create a stream that can play only one item.
`int` `reserveStreamId()` Return a reserved stream id for use.
`int` `reserveStreamId(int id)`
`void` `unreserveStreamId(int streamId)` Unreserve this id for future use.

### Methods inherited from interface org.red5.server.api.IConnection

`close, connect, connect, getBasicScopes, getClient, getClientBytesRead, getConnectParams, getDroppedMessages, getEncoding, getHost, getLastPingTime, getPath, getPendingMessages, getReadBytes, getReadMessages, getRemoteAddress, getRemoteAddresses, getRemotePort, getScope, getSessionId, getType, getWrittenBytes, getWrittenMessages, initialize, isConnected, ping, setBandwidth`

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

### Method Detail

#### reserveStreamId

    int reserveStreamId()

Return a reserved stream id for use. According to FCS/FMS regulation, the base is 1.

Returns:
  Reserved stream id

#### reserveStreamId

    int reserveStreamId(int id)

#### unreserveStreamId

    void unreserveStreamId(int streamId)

Unreserve this id for future use.

Parameters:
  `streamId` - ID of stream to unreserve

#### deleteStreamById

    void deleteStreamById(int streamId)

Deletes the stream with the given id.

Parameters:
  `streamId` - ID of stream to delete

#### getStreamById

    IClientStream getStreamById(int streamId)

Get a stream by its id.

Parameters:
  `streamId` - Stream id
Returns:
  Stream with given id

#### newSingleItemSubscriberStream

    ISingleItemSubscriberStream newSingleItemSubscriberStream(int streamId)

Create a stream that can play only one item.

Parameters:
  `streamId` - Stream id
Returns:
  New subscriber stream that can play only one item

#### newPlaylistSubscriberStream

    IPlaylistSubscriberStream newPlaylistSubscriberStream(int streamId)

Create a stream that can play a list.

Parameters:
  `streamId` - Stream id
Returns:
  New stream that can play sequence of items

#### newBroadcastStream

    IClientBroadcastStream newBroadcastStream(int streamId)

Create a broadcast stream.

Parameters:
  `streamId` - Stream id
Returns:
  New broadcast stream

#### getPendingVideoMessages

    long getPendingVideoMessages(int streamId)

Total number of video messages that are pending to be sent to a stream.

Parameters:
  `streamId` - Stream id
Returns:
  Number of pending video messages