org.lastbamboo.common.stun.server
Class TcpStunServer

java.lang.Object
  extended by org.lastbamboo.common.stun.server.AbstractStunServer
      extended by org.lastbamboo.common.stun.server.TcpStunServer
All Implemented Interfaces:
EventListener, StunServer, org.littleshoot.mina.common.IoServiceListener

public class TcpStunServer
extends AbstractStunServer

Implementation of a STUN server.


Field Summary
 
Fields inherited from class org.lastbamboo.common.stun.server.AbstractStunServer
codecFactory, ioHandler, threadName
 
Constructor Summary
TcpStunServer(org.littleshoot.mina.filter.codec.ProtocolCodecFactory codecFactory, org.littleshoot.mina.common.IoHandler ioHandler, String threadName)
          Creates a new STUN server.
 
Method Summary
 void addIoServiceListener(org.littleshoot.mina.common.IoServiceListener serviceListener)
           
protected  void bind(InetSocketAddress bindAddress)
           
 void close()
           
 
Methods inherited from class org.lastbamboo.common.stun.server.AbstractStunServer
getBoundAddress, serviceActivated, serviceDeactivated, sessionCreated, sessionDestroyed, start, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TcpStunServer

public TcpStunServer(org.littleshoot.mina.filter.codec.ProtocolCodecFactory codecFactory,
                     org.littleshoot.mina.common.IoHandler ioHandler,
                     String threadName)
Creates a new STUN server.

Parameters:
ioHandler - The IoHandler to use for processing messages and IoSessions.
threadName - Additional string for thread naming to make debugging easier.
Method Detail

bind

protected void bind(InetSocketAddress bindAddress)
             throws IOException
Specified by:
bind in class AbstractStunServer
Throws:
IOException

addIoServiceListener

public void addIoServiceListener(org.littleshoot.mina.common.IoServiceListener serviceListener)

close

public void close()


Copyright © 2013 LittleShoot. All Rights Reserved.