org.red5.server.net.rtmp

## Class RTMPMinaIoHandler

- java.lang.Object
- - org.apache.mina.core.service.IoHandlerAdapter
  - - org.red5.server.net.rtmp.RTMPMinaIoHandler

All Implemented Interfaces:
  org.apache.mina.core.service.IoHandler, org.springframework.context.ApplicationContextAware

Direct Known Subclasses:
  RTMPSMinaIoHandler

    public class RTMPMinaIoHandler
    extends org.apache.mina.core.service.IoHandlerAdapter
    implements org.springframework.context.ApplicationContextAware

Handles all RTMP protocol events fired by the MINA framework.

### Field Summary

Fields
`protected org.springframework.context.ApplicationContext` `appCtx` Application context
`protected IRTMPHandler` `handler` RTMP events handler
`protected IRTMPConnManager` `rtmpConnManager`

### Constructor Summary

Constructors
Constructor and Description
`RTMPMinaIoHandler()`

### Method Summary

Methods
`protected RTMPMinaConnection` `createRTMPMinaConnection()`
`void` `exceptionCaught(org.apache.mina.core.session.IoSession session, Throwable cause)`
`protected IRTMPConnManager` `getRtmpConnManager()`
`void` `messageReceived(org.apache.mina.core.session.IoSession session, Object message)`
`void` `messageSent(org.apache.mina.core.session.IoSession session, Object message)`
`protected void` `rawBufferRecieved(org.apache.mina.core.buffer.IoBuffer in, org.apache.mina.core.session.IoSession session)` Handle raw buffer receiving event.
`void` `sessionClosed(org.apache.mina.core.session.IoSession session)`
`void` `sessionCreated(org.apache.mina.core.session.IoSession session)`
`void` `sessionOpened(org.apache.mina.core.session.IoSession session)`
`void` `setApplicationContext(org.springframework.context.ApplicationContext appCtx)`
`void` `setHandler(IRTMPHandler handler)` Setter for handler.
`void` `setRtmpConnManager(IRTMPConnManager rtmpConnManager)`

### Methods inherited from class org.apache.mina.core.service.IoHandlerAdapter

`sessionIdle`

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

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

### Field Detail

#### handler

    protected IRTMPHandler handler

RTMP events handler

#### appCtx

    protected org.springframework.context.ApplicationContext appCtx

Application context

#### rtmpConnManager

    protected IRTMPConnManager rtmpConnManager

### Constructor Detail

#### RTMPMinaIoHandler

    public RTMPMinaIoHandler()

### Method Detail

#### sessionCreated

    public void sessionCreated(org.apache.mina.core.session.IoSession session)
                        throws Exception

Specified by:
  `sessionCreated` in interface `org.apache.mina.core.service.IoHandler`
Overrides:
  `sessionCreated` in class `org.apache.mina.core.service.IoHandlerAdapter`
Throws:
  `Exception`

#### sessionOpened

    public void sessionOpened(org.apache.mina.core.session.IoSession session)
                       throws Exception

Specified by:
  `sessionOpened` in interface `org.apache.mina.core.service.IoHandler`
Overrides:
  `sessionOpened` in class `org.apache.mina.core.service.IoHandlerAdapter`
Throws:
  `Exception`

#### sessionClosed

    public void sessionClosed(org.apache.mina.core.session.IoSession session)
                       throws Exception

Specified by:
  `sessionClosed` in interface `org.apache.mina.core.service.IoHandler`
Overrides:
  `sessionClosed` in class `org.apache.mina.core.service.IoHandlerAdapter`
Throws:
  `Exception`

#### rawBufferRecieved

    protected void rawBufferRecieved(org.apache.mina.core.buffer.IoBuffer in,
                         org.apache.mina.core.session.IoSession session)

Handle raw buffer receiving event.

Parameters:
  `in` - Data buffer
  `session` - I/O session, that is, connection between two endpoints

#### messageReceived

    public void messageReceived(org.apache.mina.core.session.IoSession session,
                       Object message)
                         throws Exception

Specified by:
  `messageReceived` in interface `org.apache.mina.core.service.IoHandler`
Overrides:
  `messageReceived` in class `org.apache.mina.core.service.IoHandlerAdapter`
Throws:
  `Exception`

#### messageSent

    public void messageSent(org.apache.mina.core.session.IoSession session,
                   Object message)
                     throws Exception

Specified by:
  `messageSent` in interface `org.apache.mina.core.service.IoHandler`
Overrides:
  `messageSent` in class `org.apache.mina.core.service.IoHandlerAdapter`
Throws:
  `Exception`

#### exceptionCaught

    public void exceptionCaught(org.apache.mina.core.session.IoSession session,
                       Throwable cause)
                         throws Exception

Specified by:
  `exceptionCaught` in interface `org.apache.mina.core.service.IoHandler`
Overrides:
  `exceptionCaught` in class `org.apache.mina.core.service.IoHandlerAdapter`
Throws:
  `Exception`

#### setHandler

    public void setHandler(IRTMPHandler handler)

Setter for handler.

Parameters:
  `handler` - RTMP events handler

#### setRtmpConnManager

    public void setRtmpConnManager(IRTMPConnManager rtmpConnManager)

#### getRtmpConnManager

    protected IRTMPConnManager getRtmpConnManager()

#### setApplicationContext

    public void setApplicationContext(org.springframework.context.ApplicationContext appCtx)
                               throws org.springframework.beans.BeansException

Specified by:
  `setApplicationContext` in interface `org.springframework.context.ApplicationContextAware`
Throws:
  `org.springframework.beans.BeansException`

#### createRTMPMinaConnection

    protected RTMPMinaConnection createRTMPMinaConnection()