org.red5.samples.components
Class ClientManager

java.lang.Object
  extended by org.red5.samples.components.ClientManager

public class ClientManager
extends Object

Class that keeps a list of client names in a SharedObject.

Author:
The Red5 Project (red5@osflash.org), Joachim Bauch (jojo@struktur.de)

Constructor Summary
ClientManager(String name, boolean persistent)
          Create a new instance of the client manager.
 
Method Summary
 void addClient(IScope scope, String username, String uid)
          A new client connected.
 String removeClient(IScope scope, String uid)
          A client disconnected.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientManager

public ClientManager(String name,
                     boolean persistent)
Create a new instance of the client manager.

Parameters:
name - name of the shared object to use
persistent - should the shared object be persistent
Method Detail

addClient

public void addClient(IScope scope,
                      String username,
                      String uid)
A new client connected. This adds the username to the shared object of the passed scope.

Parameters:
scope - scope the client connected to
username - name of the user that connected
uid - the unique id of the user that connected

removeClient

public String removeClient(IScope scope,
                           String uid)
A client disconnected. This removes the username from the shared object of the passed scope.

Parameters:
scope - scope the client disconnected from
uid - unique id of the user that disconnected
Returns:
the username of the disconnected user


Copyright © 2006-2007 the Red5 project.