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.rtmp
Class RTMPMinaIoHandler

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

All Implemented Interfaces:
  IoHandler, ApplicationContextAware

Direct Known Subclasses:
  EdgeRTMPMinaIoHandler, RTMPSMinaIoHandler

    public class RTMPMinaIoHandler

extends IoHandlerAdapter
implements ApplicationContextAware

Handles all RTMP protocol events fired by the MINA framework.

Field Summary
`protected ApplicationContext` | `appCtx` Application context
`protected ProtocolCodecFactory` | `codecFactory` RTMP protocol codec factory
`protected IRTMPHandler` | `handler` RTMP events handler
`protected boolean` | `mode` Mode
`protected IRTMPConnManager` | `rtmpConnManager`

Constructor Summary
`RTMPMinaIoHandler()`

Method Summary
`protected RTMPMinaConnection` | `createRTMPMinaConnection()`
`void` | `exceptionCaught(IoSession session, Throwable cause)`
`protected IRTMPConnManager` | `getRtmpConnManager()`
`void` | `messageReceived(IoSession session, Object in)`
`void` | `messageSent(IoSession session, Object message)`
`protected void` | `rawBufferRecieved(ProtocolState state, IoBuffer in, IoSession session)` Handle raw buffer receiving event.
`void` | `sessionClosed(IoSession session)`
`void` | `sessionCreated(IoSession session)`
`void` | `sessionOpened(IoSession session)`
`void` | `setApplicationContext(ApplicationContext appCtx)`
`void` | `setCodecFactory(ProtocolCodecFactory codecFactory)` Setter for codec factory.
`void` | `setHandler(IRTMPHandler handler)` Setter for handler.
`void` | `setMode(boolean mode)` Setter for mode.
`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

### mode

    protected boolean mode

  Mode

### appCtx

    protected ApplicationContext appCtx

  Application context

### codecFactory

    protected ProtocolCodecFactory codecFactory

  RTMP protocol codec factory

### rtmpConnManager

    protected IRTMPConnManager rtmpConnManager

Constructor Detail

### RTMPMinaIoHandler

    public RTMPMinaIoHandler()

Method Detail

### sessionCreated

    public void sessionCreated(IoSession session)
                        throws Exception

  Specified by:
    `sessionCreated` in interface `IoHandler`
  Overrides:
    `sessionCreated` in class `IoHandlerAdapter`
  Throws:
    `Exception`

### sessionOpened

    public void sessionOpened(IoSession session)
                       throws Exception

  Specified by:
    `sessionOpened` in interface `IoHandler`
  Overrides:
    `sessionOpened` in class `IoHandlerAdapter`
  Throws:
    `Exception`

### sessionClosed

    public void sessionClosed(IoSession session)
                       throws Exception

  Specified by:
    `sessionClosed` in interface `IoHandler`
  Overrides:
    `sessionClosed` in class `IoHandlerAdapter`
  Throws:
    `Exception`

### rawBufferRecieved

    protected void rawBufferRecieved(ProtocolState state,
                                     IoBuffer in,
                                     IoSession session)

  Handle raw buffer receiving event.

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

### messageReceived

    public void messageReceived(IoSession session,
                                Object in)
                         throws Exception

  Specified by:
    `messageReceived` in interface `IoHandler`
  Overrides:
    `messageReceived` in class `IoHandlerAdapter`
  Throws:
    `Exception`

### messageSent

    public void messageSent(IoSession session,
                            Object message)
                     throws Exception

  Specified by:
    `messageSent` in interface `IoHandler`
  Overrides:
    `messageSent` in class `IoHandlerAdapter`
  Throws:
    `Exception`

### exceptionCaught

    public void exceptionCaught(IoSession session,
                                Throwable cause)
                         throws Exception

  Specified by:
    `exceptionCaught` in interface `IoHandler`
  Overrides:
    `exceptionCaught` in class `IoHandlerAdapter`
  Throws:
    `Exception`

### setHandler

    public void setHandler(IRTMPHandler handler)

  Setter for handler.

  Parameters:
    `handler` - RTMP events handler

### setMode

    public void setMode(boolean mode)

  Setter for mode.

  Parameters:
    `mode` - `true` if handler should work in server mode, `false` otherwise

### setCodecFactory

    public void setCodecFactory(ProtocolCodecFactory codecFactory)

  Setter for codec factory.

  Parameters:
    `codecFactory` - RTMP protocol codec factory

### setRtmpConnManager

    public void setRtmpConnManager(IRTMPConnManager rtmpConnManager)

### getRtmpConnManager

    protected IRTMPConnManager getRtmpConnManager()

### setApplicationContext

    public void setApplicationContext(ApplicationContext appCtx)
                               throws BeansException

  Specified by:
    `setApplicationContext` in interface `ApplicationContextAware`
  Throws:
    `BeansException`

### createRTMPMinaConnection

    protected RTMPMinaConnection createRTMPMinaConnection()

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