org.lastbamboo.common.turn.server
Class TcpTurnServer

java.lang.Object
  extended by org.lastbamboo.common.turn.server.TcpTurnServer
All Implemented Interfaces:
EventListener, TcpTurnServerMBean, TurnServer, org.littleshoot.mina.common.IoServiceListener

public class TcpTurnServer
extends Object
implements TurnServer, org.littleshoot.mina.common.IoServiceListener, TcpTurnServerMBean

Server for processing TURN TCP messages.


Constructor Summary
TcpTurnServer()
          Creates a new TCP TURN server.
TcpTurnServer(TurnClientManager turnClientManager)
          Creates a new TCP TURN server.
 
Method Summary
 int getTurnPort()
          Accessor for the port the TURN server 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 server.
 void stop()
          Stops the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TcpTurnServer

public TcpTurnServer()
Creates a new TCP TURN server.


TcpTurnServer

public TcpTurnServer(TurnClientManager turnClientManager)
Creates a new TCP TURN server.

Parameters:
turnClientManager - The class that manages TURN clients.
Method Detail

start

public void start()
           throws IOException
Description copied from interface: TurnServer
Starts the server.

Specified by:
start in interface TurnServer
Throws:
IOException - If we cannot start the server for any reason.

stop

public void stop()
Description copied from interface: TurnServer
Stops the server.

Specified by:
stop in interface TurnServer

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

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

getTurnPort

public int getTurnPort()
Description copied from interface: TcpTurnServerMBean
Accessor for the port the TURN server is running on.

Specified by:
getTurnPort in interface TcpTurnServerMBean
Returns:
The port the server is running on.


Copyright © 2013 LittleShoot. All Rights Reserved.