@ManagedResource(objectName="org.red5.server:type=ClientRegistry,name=default", description="ClientRegistry") public class ClientRegistry extends Object implements IClientRegistry, ClientRegistryMXBean
Constructor and Description |
---|
ClientRegistry() |
ClientRegistry(String name) |
Modifier and Type | Method and Description |
---|---|
protected void |
addClient(IClient client)
Add client to registry
|
Client |
getClient(String id) |
ClientList<Client> |
getClientList()
Returns a list of Clients.
|
protected Collection<IClient> |
getClients()
Return collection of clients
|
boolean |
hasClient(String id)
Check whether registry has client with given id
|
protected boolean |
hasClients()
Check if client registry contains clients.
|
IClient |
lookupClient(String id)
Return client by id
|
IClient |
newClient(Object[] params)
Return client from next id with given params
|
String |
nextId()
Return next client id
|
String |
previousId()
Return previous client id
|
protected void |
removeClient(IClient client)
Removes client from registry
|
public ClientRegistry()
public ClientRegistry(String name)
protected void addClient(IClient client)
client
- Client to addpublic Client getClient(String id) throws ClientNotFoundException
getClient
in interface ClientRegistryMXBean
ClientNotFoundException
public ClientList<Client> getClientList()
getClientList
in interface ClientRegistryMXBean
protected boolean hasClients()
True
if clients exist, otherwise False
protected Collection<IClient> getClients()
public boolean hasClient(String id)
hasClient
in interface IClientRegistry
hasClient
in interface ClientRegistryMXBean
id
- Client idpublic IClient lookupClient(String id) throws ClientNotFoundException
lookupClient
in interface IClientRegistry
id
- Client idClientNotFoundException
- if we can't find clientpublic IClient newClient(Object[] params) throws ClientNotFoundException, ClientRejectedException
newClient
in interface IClientRegistry
params
- Client paramsClientNotFoundException
- if client not foundClientRejectedException
- if client rejectedpublic String nextId()
nextId
in interface ClientRegistryMXBean
public String previousId()
previousId
in interface ClientRegistryMXBean
protected void removeClient(IClient client)
client
- Client to removeCopyright © 2006-2012 The Red5 Project