Interface IClientRegistry

All Known Implementing Classes:
ClientRegistry

public interface IClientRegistry
Provides a registry of client objects. You can lookup a client by its client id / session id using lookupClient method. This interface implementations also create new client objects from given params, usually passed from client-side Flex/Flash application upon initial connection.
Author:
The Red5 Project, Luke Hubbard (luke@codegent.com)
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds a client to the registry.
    boolean
    Check if a client with a given id exists.
    Return an existing client from a client id.
    newClient(Object[] params)
    Create a new client client object from connection params.
  • Method Details

    • hasClient

      boolean hasClient(String id)
      Check if a client with a given id exists.
      Parameters:
      id - the id of the client to check for
      Returns:
       true
       
      if the client exists,
       false
       
      otherwise
    • newClient

      Create a new client client object from connection params.
      Parameters:
      params - the parameters the client passed during connection
      Returns:
      the new client
      Throws:
      ClientNotFoundException - no client could be created from the passed parameters
      ClientRejectedException - the client is not allowed to connect
    • lookupClient

      IClient lookupClient(String id) throws ClientNotFoundException
      Return an existing client from a client id.
      Parameters:
      id - the id of the client to return
      Returns:
      the client object
      Throws:
      ClientNotFoundException - no client with the passed id exists
    • addClient

      void addClient(IClient client)
      Adds a client to the registry.
      Parameters:
      client - client