org.lastbamboo.common.stun.server
Class UdpStunServer

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

public class UdpStunServer
extends AbstractStunServer

Implementation of a STUN server.


Field Summary
 
Fields inherited from class org.lastbamboo.common.stun.server.AbstractStunServer
codecFactory, ioHandler, threadName
 
Constructor Summary
UdpStunServer(org.littleshoot.mina.filter.codec.ProtocolCodecFactory codecFactory, org.littleshoot.mina.common.IoHandler ioHandler, String threadName)
          Creates a new STUN server.
UdpStunServer(org.littleshoot.stun.stack.message.StunMessageVisitorFactory visitorFactory, 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

UdpStunServer

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

Parameters:
codecFactory - The class for creating codec handlers.
ioHandler - The class for processing STUN I/O events.
threadName - Additional string for thread naming to make debugging easier.

UdpStunServer

public UdpStunServer(org.littleshoot.stun.stack.message.StunMessageVisitorFactory visitorFactory,
                     String threadName)
Creates a new STUN server.

Parameters:
visitorFactory - The factory for creating classes for visiting STUN messages and handling them appropriately as they're read.
threadName - Additional string for thread naming to make debugging easier.
Method Detail

bind

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

addIoServiceListener

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

close

public void close()


Copyright © 2013 LittleShoot. All Rights Reserved.