org.lastbamboo.common.turn.server
Class TurnClientManagerImpl

java.lang.Object
  extended by org.lastbamboo.common.turn.server.TurnClientManagerImpl
All Implemented Interfaces:
TurnClientManager, TurnClientManagerImplMBean

public final class TurnClientManagerImpl
extends Object
implements TurnClientManager, TurnClientManagerImplMBean

Manages endpoint bindings for TURN clients. This includes allocating bindings, timing out bindings, etc.


Constructor Summary
TurnClientManagerImpl()
          Creates a new TURN client manager.
 
Method Summary
 TurnClient allocateBinding(org.littleshoot.mina.common.IoSession ioSession)
          Allocates a binding for the specified TURN client that other nodes can use to access it.
 int getMaxNumRemoteSingleTurnClient()
          Get the maximum number of remote host connections we've seen for any single client.
 int getMaxNumRemoteTurnClients()
          Accessor for the maximum number of remote clients at any one time.
 int getMaxNumTurnClients()
          Accessor for the maximum number of TURN clients seen.
 int getNumRemoteTurnClients()
          Accessor for the total number of remote clients accessing the server.
 int getNumTurnClients()
          Accessor for the number of clients currently connected to this TURN server.
 TurnClient getTurnClient(org.littleshoot.mina.common.IoSession readerWriter)
          Accessor for the TURN client handler for the specified TURN client address.
 TurnClient removeBinding(org.littleshoot.mina.common.IoSession session)
          Removes the TURN client associated with the specified reader/writer instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TurnClientManagerImpl

public TurnClientManagerImpl()
Creates a new TURN client manager.

Method Detail

allocateBinding

public TurnClient allocateBinding(org.littleshoot.mina.common.IoSession ioSession)
Description copied from interface: TurnClientManager
Allocates a binding for the specified TURN client that other nodes can use to access it.

Specified by:
allocateBinding in interface TurnClientManager
Parameters:
ioSession - The class for writing data back to the TURN client.
Returns:
The client proxy.

getTurnClient

public TurnClient getTurnClient(org.littleshoot.mina.common.IoSession readerWriter)
Description copied from interface: TurnClientManager
Accessor for the TURN client handler for the specified TURN client address.

Specified by:
getTurnClient in interface TurnClientManager
Parameters:
readerWriter - The reader/writer for the client.
Returns:
The TURN client class that handles writing data to the client and accepting incoming connection on the client's behalf.

removeBinding

public TurnClient removeBinding(org.littleshoot.mina.common.IoSession session)
Description copied from interface: TurnClientManager
Removes the TURN client associated with the specified reader/writer instance.

Specified by:
removeBinding in interface TurnClientManager
Parameters:
session - The reader/writer to remove.
Returns:
The removed client instance.

getNumTurnClients

public int getNumTurnClients()
Description copied from interface: TurnClientManagerImplMBean
Accessor for the number of clients currently connected to this TURN server.

Specified by:
getNumTurnClients in interface TurnClientManagerImplMBean
Returns:
The number of clients currently connected to this TURN server.

getMaxNumTurnClients

public int getMaxNumTurnClients()
Description copied from interface: TurnClientManagerImplMBean
Accessor for the maximum number of TURN clients seen.

Specified by:
getMaxNumTurnClients in interface TurnClientManagerImplMBean
Returns:
The maximum number of TURN clients seen.

getNumRemoteTurnClients

public int getNumRemoteTurnClients()
Description copied from interface: TurnClientManagerImplMBean
Accessor for the total number of remote clients accessing the server.

Specified by:
getNumRemoteTurnClients in interface TurnClientManagerImplMBean
Returns:
The total number of remote clients accessing the server.

getMaxNumRemoteTurnClients

public int getMaxNumRemoteTurnClients()
Description copied from interface: TurnClientManagerImplMBean
Accessor for the maximum number of remote clients at any one time.

Note that this number is not necessarily precisely accurate. Rather it reflects the maximum number for any time we've taken a reading, which should be close to the true value.

Specified by:
getMaxNumRemoteTurnClients in interface TurnClientManagerImplMBean
Returns:
The maximum number of remote clients at any one time.

getMaxNumRemoteSingleTurnClient

public int getMaxNumRemoteSingleTurnClient()
Description copied from interface: TurnClientManagerImplMBean
Get the maximum number of remote host connections we've seen for any single client.

Note that this number is not necessarily precisely accurate. Rather it reflects the maximum number for any time we've taken a reading, which should be close to the true value.

Specified by:
getMaxNumRemoteSingleTurnClient in interface TurnClientManagerImplMBean
Returns:
The maximum number of remote host connections we've seen for any single client.


Copyright © 2013 LittleShoot. All Rights Reserved.