org.littleshoot.stun.stack
Class StunIoHandler<T>
java.lang.Object
org.littleshoot.mina.common.IoHandlerAdapter
org.littleshoot.stun.stack.StunIoHandler<T>
- Type Parameters:
T - The type returned when visitors visit StunMessages.
- All Implemented Interfaces:
- org.littleshoot.mina.common.IoHandler
public class StunIoHandler<T>
- extends org.littleshoot.mina.common.IoHandlerAdapter
Processes STUN messages. This class can be sub-classed to implement
specialized policies, for example for specialized policies for idle sessions
for specific STUN usages.
|
Method Summary |
void |
exceptionCaught(org.littleshoot.mina.common.IoSession session,
Throwable cause)
|
void |
messageReceived(org.littleshoot.mina.common.IoSession session,
Object message)
|
void |
sessionCreated(org.littleshoot.mina.common.IoSession session)
|
void |
sessionIdle(org.littleshoot.mina.common.IoSession session,
org.littleshoot.mina.common.IdleStatus status)
|
| Methods inherited from class org.littleshoot.mina.common.IoHandlerAdapter |
messageSent, sessionClosed, sessionOpened |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StunIoHandler
public StunIoHandler(StunMessageVisitorFactory visitorFactory)
- Creates a new STUN IO handler class.
- Parameters:
visitorFactory - The factory for creating visitors for the
specific STUN deployment. Some factories might create visitors for the
client side while others create visitors for the server side,
for example.
messageReceived
public void messageReceived(org.littleshoot.mina.common.IoSession session,
Object message)
- Specified by:
messageReceived in interface org.littleshoot.mina.common.IoHandler- Overrides:
messageReceived in class org.littleshoot.mina.common.IoHandlerAdapter
exceptionCaught
public void exceptionCaught(org.littleshoot.mina.common.IoSession session,
Throwable cause)
- Specified by:
exceptionCaught in interface org.littleshoot.mina.common.IoHandler- Overrides:
exceptionCaught in class org.littleshoot.mina.common.IoHandlerAdapter
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)
- Specified by:
sessionIdle in interface org.littleshoot.mina.common.IoHandler- Overrides:
sessionIdle in class org.littleshoot.mina.common.IoHandlerAdapter
Copyright © 2013 LittleShoot. All Rights Reserved.