org.lastbamboo.common.ice.transport
Class IceUdpConnector

java.lang.Object
  extended by org.lastbamboo.common.ice.transport.IceUdpConnector
All Implemented Interfaces:
EventListener, IceConnector, org.littleshoot.mina.common.IoServiceListener

public class IceUdpConnector
extends Object
implements IceConnector, org.littleshoot.mina.common.IoServiceListener

Class for creating a UDP "connection" for ICE. This really just sets up the UDP transport for a UDP connectivity check.


Constructor Summary
IceUdpConnector(org.littleshoot.mina.filter.codec.ProtocolCodecFactory protocolCodecFactory, org.littleshoot.mina.common.IoHandler demuxingIoHandler, boolean controlling)
          Creates a new UDP connector.
 
Method Summary
 void addIoServiceListener(org.littleshoot.mina.common.IoServiceListener serviceListener)
          Adds the specified IoServiceListener to connections created with this connector.
 org.littleshoot.mina.common.IoSession connect(InetSocketAddress localAddress, InetSocketAddress remoteAddress)
          Creates a new connection from the specified local address to the specified remote address.
 void serviceActivated(org.littleshoot.mina.common.IoService arg0, SocketAddress arg1, org.littleshoot.mina.common.IoHandler arg2, org.littleshoot.mina.common.IoServiceConfig arg3)
           
 void serviceDeactivated(org.littleshoot.mina.common.IoService arg0, SocketAddress arg1, org.littleshoot.mina.common.IoHandler arg2, org.littleshoot.mina.common.IoServiceConfig arg3)
           
 void sessionCreated(org.littleshoot.mina.common.IoSession arg0)
           
 void sessionDestroyed(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

IceUdpConnector

public IceUdpConnector(org.littleshoot.mina.filter.codec.ProtocolCodecFactory protocolCodecFactory,
                       org.littleshoot.mina.common.IoHandler demuxingIoHandler,
                       boolean controlling)
Creates a new UDP connector.

Parameters:
protocolCodecFactory - The class for interpreting the protocol for the connection.
demuxingIoHandler - The class for processing read and written messages.
controlling - Whether or not we're the controlling agent.
Method Detail

connect

public org.littleshoot.mina.common.IoSession connect(InetSocketAddress localAddress,
                                                     InetSocketAddress remoteAddress)
Description copied from interface: IceConnector
Creates a new connection from the specified local address to the specified remote address.

Specified by:
connect in interface IceConnector
Parameters:
localAddress - The local address to connect from.
remoteAddress - The remote address to connect to.
Returns:
The MINA IoSession for the connection.

addIoServiceListener

public void addIoServiceListener(org.littleshoot.mina.common.IoServiceListener serviceListener)
Description copied from interface: IceConnector
Adds the specified IoServiceListener to connections created with this connector.

Specified by:
addIoServiceListener in interface IceConnector
Parameters:
serviceListener - The listener to be notified of connection events.

serviceActivated

public void serviceActivated(org.littleshoot.mina.common.IoService arg0,
                             SocketAddress arg1,
                             org.littleshoot.mina.common.IoHandler arg2,
                             org.littleshoot.mina.common.IoServiceConfig arg3)
Specified by:
serviceActivated in interface org.littleshoot.mina.common.IoServiceListener

serviceDeactivated

public void serviceDeactivated(org.littleshoot.mina.common.IoService arg0,
                               SocketAddress arg1,
                               org.littleshoot.mina.common.IoHandler arg2,
                               org.littleshoot.mina.common.IoServiceConfig arg3)
Specified by:
serviceDeactivated in interface org.littleshoot.mina.common.IoServiceListener

sessionCreated

public void sessionCreated(org.littleshoot.mina.common.IoSession arg0)
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


Copyright © 2013 LittleShoot. All Rights Reserved.