org.red5.server.net.rtmp
Class RTMPMinaIoHandler

java.lang.Object
  extended by org.apache.mina.core.service.IoHandlerAdapter
      extended by org.red5.server.net.rtmp.RTMPMinaIoHandler
All Implemented Interfaces:
IoHandler, Aware, ApplicationContextAware
Direct Known Subclasses:
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  IRTMPHandler handler
          RTMP events handler
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 message)
          
 void messageSent(IoSession session, Object message)
          
protected  void rawBufferRecieved(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 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 ApplicationContext appCtx
Application context


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(IoBuffer in,
                                 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(IoSession session,
                            Object message)
                     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

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()


Copyright © 2006-2012 The Red5 Project