org.lastbamboo.common.sip.stack.codec
Class SipIoHandler

java.lang.Object
  extended by org.lastbamboo.common.sip.stack.codec.SipIoHandler
All Implemented Interfaces:
org.littleshoot.mina.common.IoHandler

public class SipIoHandler
extends Object
implements org.littleshoot.mina.common.IoHandler

Protocol handler for SIP messages.


Constructor Summary
SipIoHandler(SipMessageVisitorFactory visitorFactory)
          Creates a new protocol handler.
SipIoHandler(SipMessageVisitorFactory visitorFactory, IdleSipSessionListener idleSipSessionListener)
          Creates a new protocol handler.
 
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

SipIoHandler

public SipIoHandler(SipMessageVisitorFactory visitorFactory)
Creates a new protocol handler.

Parameters:
visitorFactory - The factory for creating visitors for read messages. Factories might create specialized visitors for clients or servers, for example.

SipIoHandler

public SipIoHandler(SipMessageVisitorFactory visitorFactory,
                    IdleSipSessionListener idleSipSessionListener)
Creates a new protocol handler.

Parameters:
visitorFactory - The factory for creating visitors for read messages. Factories might create specialized visitors for clients or servers, for example.
idleSipSessionListener - Listener for idle sessions.
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
Throws:
Exception

messageReceived

public final void messageReceived(org.littleshoot.mina.common.IoSession session,
                                  Object message)
                           throws Exception
Specified by:
messageReceived in interface org.littleshoot.mina.common.IoHandler
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
Throws:
Exception

sessionOpened

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

sessionClosed

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

sessionCreated

public void sessionCreated(org.littleshoot.mina.common.IoSession session)
                    throws Exception
Specified by:
sessionCreated in interface org.littleshoot.mina.common.IoHandler
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


Copyright © 2013 LittleShoot. All Rights Reserved.