org.red5.server.stream.consumer

## Class ConnectionConsumer

- java.lang.Object
- - org.red5.server.stream.consumer.ConnectionConsumer

All Implemented Interfaces:
  IConsumer, IMessageComponent, IPipeConnectionListener, IPushableConsumer

    public class ConnectionConsumer
    extends Object
    implements IPushableConsumer, IPipeConnectionListener

RTMP connection consumer.

### Field Summary

Fields
`static String` `KEY` Connection consumer class name

### Constructor Summary

Constructors
Constructor and Description
`ConnectionConsumer(RTMPConnection conn, int videoChannel, int audioChannel, int dataChannel)` Create rtmp connection consumer for given connection and channels

### Method Summary

Methods
`void` `onOOBControlMessage(IMessageComponent source, IPipe pipe, OOBControlMessage oobCtrlMsg)`
`void` `onPipeConnectionEvent(PipeConnectionEvent event)` Pipe connection event handler
`void` `pushMessage(IPipe pipe, IMessage message)` Pushes message through pipe

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### KEY

    public static final String KEY

Connection consumer class name

### Constructor Detail

#### ConnectionConsumer

    public ConnectionConsumer(RTMPConnection conn,
                      int videoChannel,
                      int audioChannel,
                      int dataChannel)

Create rtmp connection consumer for given connection and channels

Parameters:
  `conn` - RTMP connection
  `videoChannel` - Video channel
  `audioChannel` - Audio channel
  `dataChannel` - Data channel

### Method Detail

#### pushMessage

    public void pushMessage(IPipe pipe,
                   IMessage message)

Pushes message through pipe

Specified by:
  `pushMessage` in interface `IPushableConsumer`
Parameters:
  `pipe` - Pipe
  `message` - Message

#### onPipeConnectionEvent

    public void onPipeConnectionEvent(PipeConnectionEvent event)

Pipe connection event handler

Specified by:
  `onPipeConnectionEvent` in interface `IPipeConnectionListener`
Parameters:
  `event` - Pipe connection event

#### onOOBControlMessage

    public void onOOBControlMessage(IMessageComponent source,
                           IPipe pipe,
                           OOBControlMessage oobCtrlMsg)

Specified by:
  `onOOBControlMessage` in interface `IMessageComponent`
Parameters:
  `source` - Message component source
  `pipe` - Connection pipe
  `oobCtrlMsg` - Out-of-band control message