org.littleshoot.util.mina
Class DemuxingIoHandler<T,Z>

java.lang.Object
  extended by org.littleshoot.mina.common.IoHandlerAdapter
      extended by org.littleshoot.util.mina.DemuxingIoHandler<T,Z>
Type Parameters:
T - The type of the message Class for the first protocol.
Z - The type of the message Class for the second protocol.
All Implemented Interfaces:
org.littleshoot.mina.common.IoHandler

public class DemuxingIoHandler<T,Z>
extends org.littleshoot.mina.common.IoHandlerAdapter

IoHandler that allows multiple protocols to run over the same IoSession.


Constructor Summary
DemuxingIoHandler(Class<T> class1, org.littleshoot.mina.common.IoHandler ioHandler1, Class<Z> class2, org.littleshoot.mina.common.IoHandler ioHandler2)
          Creates a new IoHandler that demultiplexes encoded and decoded messages between STUN and another protocol.
 
Method Summary
 void exceptionCaught(org.littleshoot.mina.common.IoSession session, Throwable cause)
           
 void messageReceived(org.littleshoot.mina.common.IoSession session, Object message)
           
 void messageSent(org.littleshoot.mina.common.IoSession session, Object message)
           
 void sessionClosed(org.littleshoot.mina.common.IoSession session)
           
 void sessionCreated(org.littleshoot.mina.common.IoSession session)
           
 void sessionIdle(org.littleshoot.mina.common.IoSession session, org.littleshoot.mina.common.IdleStatus status)
           
 void sessionOpened(org.littleshoot.mina.common.IoSession session)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DemuxingIoHandler

public DemuxingIoHandler(Class<T> class1,
                         org.littleshoot.mina.common.IoHandler ioHandler1,
                         Class<Z> class2,
                         org.littleshoot.mina.common.IoHandler ioHandler2)
Creates a new IoHandler that demultiplexes encoded and decoded messages between STUN and another protocol.

Parameters:
class1 - The message class for the first protocol.
ioHandler1 - The IoHandler for the first protocol.
class2 - The message class for the second protocol.
ioHandler2 - The IoHandler for the second protocol.
Method Detail

exceptionCaught

public void exceptionCaught(org.littleshoot.mina.common.IoSession session,
                            Throwable cause)
                     throws Exception
Specified by:
exceptionCaught in interface org.littleshoot.mina.common.IoHandler
Overrides:
exceptionCaught in class org.littleshoot.mina.common.IoHandlerAdapter
Throws:
Exception

messageReceived

public void messageReceived(org.littleshoot.mina.common.IoSession session,
                            Object message)
                     throws Exception
Specified by:
messageReceived in interface org.littleshoot.mina.common.IoHandler
Overrides:
messageReceived in class org.littleshoot.mina.common.IoHandlerAdapter
Throws:
Exception

messageSent

public void messageSent(org.littleshoot.mina.common.IoSession session,
                        Object message)
                 throws Exception
Specified by:
messageSent in interface org.littleshoot.mina.common.IoHandler
Overrides:
messageSent in class org.littleshoot.mina.common.IoHandlerAdapter
Throws:
Exception

sessionClosed

public void sessionClosed(org.littleshoot.mina.common.IoSession session)
                   throws Exception
Specified by:
sessionClosed in interface org.littleshoot.mina.common.IoHandler
Overrides:
sessionClosed in class org.littleshoot.mina.common.IoHandlerAdapter
Throws:
Exception

sessionCreated

public void sessionCreated(org.littleshoot.mina.common.IoSession session)
                    throws Exception
Specified by:
sessionCreated in interface org.littleshoot.mina.common.IoHandler
Overrides:
sessionCreated in class org.littleshoot.mina.common.IoHandlerAdapter
Throws:
Exception

sessionIdle

public void sessionIdle(org.littleshoot.mina.common.IoSession session,
                        org.littleshoot.mina.common.IdleStatus status)
                 throws Exception
Specified by:
sessionIdle in interface org.littleshoot.mina.common.IoHandler
Overrides:
sessionIdle in class org.littleshoot.mina.common.IoHandlerAdapter
Throws:
Exception

sessionOpened

public void sessionOpened(org.littleshoot.mina.common.IoSession session)
                   throws Exception
Specified by:
sessionOpened in interface org.littleshoot.mina.common.IoHandler
Overrides:
sessionOpened in class org.littleshoot.mina.common.IoHandlerAdapter
Throws:
Exception


Copyright © 2013 LittleShoot. All Rights Reserved.