OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Properties | List of all members
OpenSim.Framework.ClientManager Class Reference

Maps from client AgentID and RemoteEndPoint values to IClientAPI references for all of the connected clients More...

Public Member Functions

 ClientManager ()
 Default constructor More...
 
bool Add (IClientAPI value)
 Add a client reference to the collection if it does not already exist More...
 
bool Remove (UUID key)
 Remove a client from the collection More...
 
void Clear ()
 Resets the client collection More...
 
bool ContainsKey (UUID key)
 Checks if a UUID is in the collection More...
 
bool ContainsKey (IPEndPoint key)
 Checks if an endpoint is in the collection More...
 
bool TryGetValue (UUID key, out IClientAPI value)
 Attempts to fetch a value out of the collection More...
 
bool TryGetValue (IPEndPoint key, out IClientAPI value)
 Attempts to fetch a value out of the collection More...
 
void ForEach (Action< IClientAPI > action)
 Performs a given task in parallel for each of the elements in the collection More...
 
void ForEachSync (Action< IClientAPI > action)
 Performs a given task synchronously for each of the elements in the collection More...
 

Properties

int Count [get]
 Number of clients in the collection More...
 

Detailed Description

Maps from client AgentID and RemoteEndPoint values to IClientAPI references for all of the connected clients

Definition at line 41 of file ClientManager.cs.

Constructor & Destructor Documentation

OpenSim.Framework.ClientManager.ClientManager ( )
inline

Default constructor

Definition at line 61 of file ClientManager.cs.

Member Function Documentation

bool OpenSim.Framework.ClientManager.Add ( IClientAPI  value)
inline

Add a client reference to the collection if it does not already exist

Parameters
valueReference to the client object
Returns
True if the client reference was successfully added, otherwise false if the given key already existed in the collection

Definition at line 75 of file ClientManager.cs.

void OpenSim.Framework.ClientManager.Clear ( )
inline

Resets the client collection

Definition at line 137 of file ClientManager.cs.

bool OpenSim.Framework.ClientManager.ContainsKey ( UUID  key)
inline

Checks if a UUID is in the collection

Parameters
keyUUID to check for
Returns
True if the UUID was found in the collection, otherwise false

Definition at line 152 of file ClientManager.cs.

bool OpenSim.Framework.ClientManager.ContainsKey ( IPEndPoint  key)
inline

Checks if an endpoint is in the collection

Parameters
keyEndpoint to check for
Returns
True if the endpoint was found in the collection, otherwise false

Definition at line 162 of file ClientManager.cs.

void OpenSim.Framework.ClientManager.ForEach ( Action< IClientAPI action)
inline

Performs a given task in parallel for each of the elements in the collection

Parameters
actionAction to perform on each element

Definition at line 204 of file ClientManager.cs.

void OpenSim.Framework.ClientManager.ForEachSync ( Action< IClientAPI action)
inline

Performs a given task synchronously for each of the elements in the collection

Parameters
actionAction to perform on each element

Definition at line 218 of file ClientManager.cs.

bool OpenSim.Framework.ClientManager.Remove ( UUID  key)
inline

Remove a client from the collection

Parameters
keyUUID of the client to remove
Returns
True if a client was removed, or false if the given UUID was not present in the collection

Definition at line 105 of file ClientManager.cs.

bool OpenSim.Framework.ClientManager.TryGetValue ( UUID  key,
out IClientAPI  value 
)
inline

Attempts to fetch a value out of the collection

Parameters
keyUUID of the client to retrieve
valueRetrieved client, or null on lookup failure
Returns
True if the lookup succeeded, otherwise false

Definition at line 173 of file ClientManager.cs.

bool OpenSim.Framework.ClientManager.TryGetValue ( IPEndPoint  key,
out IClientAPI  value 
)
inline

Attempts to fetch a value out of the collection

Parameters
keyEndpoint of the client to retrieve
valueRetrieved client, or null on lookup failure
Returns
True if the lookup succeeded, otherwise false

Definition at line 189 of file ClientManager.cs.

Property Documentation

int OpenSim.Framework.ClientManager.Count
get

Number of clients in the collection

Definition at line 56 of file ClientManager.cs.


The documentation for this class was generated from the following file: