org.lastbamboo.common.sip.proxy
Class SipProxyImpl

java.lang.Object
  extended by org.lastbamboo.common.sip.proxy.SipProxyImpl
All Implemented Interfaces:
EventListener, SipProxy, SipProxyImplMBean, org.littleshoot.mina.common.IoServiceListener

public class SipProxyImpl
extends Object
implements SipProxy, org.littleshoot.mina.common.IoServiceListener, SipProxyImplMBean

Implementation of a SIP proxy.


Constructor Summary
SipProxyImpl(SipRequestAndResponseForwarder forwarder, SipRegistrar registrar, org.lastbamboo.common.sip.stack.message.header.SipHeaderFactory sipHeaderFactory, org.lastbamboo.common.sip.stack.message.SipMessageFactory sipMessageFactory, org.lastbamboo.common.sip.stack.transport.SipTcpTransportLayer transportLayer)
          Creates a new SIP server.
 
Method Summary
 int getSipPort()
          Accessor for the port SIP is running on.
 void serviceActivated(org.littleshoot.mina.common.IoService service, SocketAddress serviceAddress, org.littleshoot.mina.common.IoHandler handler, org.littleshoot.mina.common.IoServiceConfig config)
           
 void serviceDeactivated(org.littleshoot.mina.common.IoService service, SocketAddress serviceAddress, org.littleshoot.mina.common.IoHandler handler, org.littleshoot.mina.common.IoServiceConfig config)
           
 void sessionCreated(org.littleshoot.mina.common.IoSession session)
           
 void sessionDestroyed(org.littleshoot.mina.common.IoSession session)
           
 void start()
          Starts the proxy.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SipProxyImpl

public SipProxyImpl(SipRequestAndResponseForwarder forwarder,
                    SipRegistrar registrar,
                    org.lastbamboo.common.sip.stack.message.header.SipHeaderFactory sipHeaderFactory,
                    org.lastbamboo.common.sip.stack.message.SipMessageFactory sipMessageFactory,
                    org.lastbamboo.common.sip.stack.transport.SipTcpTransportLayer transportLayer)
Creates a new SIP server.

Parameters:
forwarder - The class that forwards messages.
registrar - The class that tracks registered clients.
sipHeaderFactory - The class for creating SIP headers.
sipMessageFactory - The class for creating SIP messages.
transportLayer - The class that writes messages to the network, modifying them as appropriate prior to transport.
Method Detail

start

public void start()
           throws IOException
Description copied from interface: SipProxy
Starts the proxy.

Specified by:
start in interface SipProxy
Throws:
IOException - If there's an error binding to the port.

sessionCreated

public void sessionCreated(org.littleshoot.mina.common.IoSession session)
Specified by:
sessionCreated in interface org.littleshoot.mina.common.IoServiceListener

sessionDestroyed

public void sessionDestroyed(org.littleshoot.mina.common.IoSession session)
Specified by:
sessionDestroyed in interface org.littleshoot.mina.common.IoServiceListener

serviceActivated

public void serviceActivated(org.littleshoot.mina.common.IoService service,
                             SocketAddress serviceAddress,
                             org.littleshoot.mina.common.IoHandler handler,
                             org.littleshoot.mina.common.IoServiceConfig config)
Specified by:
serviceActivated in interface org.littleshoot.mina.common.IoServiceListener

serviceDeactivated

public void serviceDeactivated(org.littleshoot.mina.common.IoService service,
                               SocketAddress serviceAddress,
                               org.littleshoot.mina.common.IoHandler handler,
                               org.littleshoot.mina.common.IoServiceConfig config)
Specified by:
serviceDeactivated in interface org.littleshoot.mina.common.IoServiceListener

getSipPort

public int getSipPort()
Description copied from interface: SipProxyImplMBean
Accessor for the port SIP is running on.

Specified by:
getSipPort in interface SipProxyImplMBean
Returns:
The port SIP is running on.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 LittleShoot. All Rights Reserved.