org.lastbamboo.common.turn.client
Class StunTcpFrameTurnClientListener

java.lang.Object
  extended by org.lastbamboo.common.turn.client.StunTcpFrameTurnClientListener
All Implemented Interfaces:
TurnClientListener

public class StunTcpFrameTurnClientListener
extends Object
implements TurnClientListener

Class that processes incoming data from a TURN client that needs to be demultiplexed between TCP frames and STUN messages.


Constructor Summary
StunTcpFrameTurnClientListener(org.littleshoot.stun.stack.message.StunMessageVisitorFactory stunMessageVisitorFactory, TurnClientListener delegateListener)
          Creates a new class that decodes TcpFrames from incoming data.
 
Method Summary
 void close()
           
 void onData(InetSocketAddress remoteAddress, org.littleshoot.mina.common.IoSession session, byte[] data)
           
 void onRemoteAddressClosed(InetSocketAddress remoteAddress)
           
 org.littleshoot.mina.common.IoSession onRemoteAddressOpened(InetSocketAddress remoteAddress, org.littleshoot.mina.common.IoSession ioSession)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StunTcpFrameTurnClientListener

public StunTcpFrameTurnClientListener(org.littleshoot.stun.stack.message.StunMessageVisitorFactory stunMessageVisitorFactory,
                                      TurnClientListener delegateListener)
Creates a new class that decodes TcpFrames from incoming data.

Parameters:
stunMessageVisitorFactory - The factory for visiting STUN messages.
delegateListener - The listener to forward all events to.
mapper - Class that maps STUN transaction IDs to remote addresses.
Method Detail

onData

public void onData(InetSocketAddress remoteAddress,
                   org.littleshoot.mina.common.IoSession session,
                   byte[] data)
Specified by:
onData in interface TurnClientListener

onRemoteAddressOpened

public org.littleshoot.mina.common.IoSession onRemoteAddressOpened(InetSocketAddress remoteAddress,
                                                                   org.littleshoot.mina.common.IoSession ioSession)
Specified by:
onRemoteAddressOpened in interface TurnClientListener

onRemoteAddressClosed

public void onRemoteAddressClosed(InetSocketAddress remoteAddress)
Specified by:
onRemoteAddressClosed in interface TurnClientListener

close

public void close()
Specified by:
close in interface TurnClientListener


Copyright © 2013 LittleShoot. All Rights Reserved.