Main Page | Class Hierarchy | Class List | File List | Class Members

Manager Class Reference

#include <manager.h>

Collaboration diagram for Manager:

Collaboration graph
[legend]
List of all members.

Clean up dead activeMembers

void CollectGarbage ()
virtual void GarbageMain (PThread &, INT)
PThread * garbageCollector
PSyncPoint garbageExit

Public Member Functions

 Manager (LaunchNewId &lid, PString &ourId, PString &ourPassword)
 ~Manager ()
void EndEverything ()
PString GetOurPassword ()
PString GetOurId ()
PString GetStatusInfo (const PString &token)
PString GetDurationInfo (const PString &token)
void AcceptThisCall (const PString &uniqueCallId)
void RejectThisCall (const PString &uniqueCallId)
BOOL GetSendToAddress (const PString &SsMcuToken, PIPSocket::Address &address, PINDEX &portNo)
LaunchNewIdGetLaunchNewId ()
void RequestNewId (const PString &requester, PStringArray &cmds)
void RemoveMemberId (PString memberId)
void RemoveConferenceRoomId (PString roomId)
void DestroyOldComms (Comms *oldComms)
void Main ()
CommsCreateCall (const PString &remoteCont, const PString &preferredId)
CommsRemoveFromPreCallQueue (const PString &preferredId)
BOOL WaitUntilSupervisorOk ()
PSafePtr< ConferenceRoomGetConferenceRoom (PString roomId)
PSafePtr< MemberGetMember (PString memberId)
PString ProcessStatusQuery (PStringArray &cmds)
void ClearCommsId (PString _memberId)

Protected Member Functions

void RemoveAllCalls ()
void RemoveGarbageCollector ()

Protected Attributes

LaunchNewIdlid
Supervisorsupervisor
MessageFrameList nodesMakingCalls
MessageFrameList activeCalls
MessageFrameList destroyTheseCalls
PString controllerId
PString ourPassword
PString ourId
PSyncPoint syncPoint
Manager::ConferenceRoomDict activeRooms
MemberDict activeMembers
CommsProviderrunningComms
PAtomicInteger bogusIdCount

Classes

class  ConferenceRoomDict

Detailed Description

The major class of this application. The rmote node controls us via the Supervisor class.

This class has access to all the internal variables of opal


Constructor & Destructor Documentation

Manager::Manager LaunchNewId lid,
PString &  ourId,
PString &  ourPassword
 

Constructor

Manager::~Manager  ) 
 

destructor


Member Function Documentation

void Manager::AcceptThisCall const PString &  uniqueCallId  )  [inline]
 

Advise the manager to accept this call, which has a particular callId

void Manager::ClearCommsId PString  _memberId  ) 
 

Cause the comms instance in activeCalls to be moved to the dead comms list. Give no error if the specified comms instance could not be found

void Manager::CollectGarbage  )  [protected]
 

The method which does the garbage collection

Comms * Manager::CreateCall const PString &  remoteCont,
const PString &  preferredId
 

Called from a descendant of a MessageFrame class instance to create a call

void Manager::DestroyOldComms Comms oldComms  )  [inline]
 

Take this old Comms structure, and delete it,

Here is the call graph for this function:

void Manager::EndEverything  ) 
 

Set the syncpoint to run, which ends the main thread

void Manager::GarbageMain PThread &  ,
INT 
[protected, virtual]
 

This contains the 1 second delay loop, and calls to CollectGarbage

PSafePtr< ConferenceRoom > Manager::GetConferenceRoom PString  roomId  ) 
 

get a safe ptr to the conference room matching a particular ID

PString Manager::GetDurationInfo const PString &  token  )  [inline]
 

Get information (in a textual form) of how long this call has been up

LaunchNewId& Manager::GetLaunchNewId  )  [inline]
 

Return a reference to the pyython launcher for this program

PSafePtr< Member > Manager::GetMember PString  memberId  ) 
 

Get one element from the list of members

PString Manager::GetOurId  )  [inline]
 

Return our id which is used to connect the message server

PString Manager::GetOurPassword  )  [inline]
 

Return the password used to connect to the message server

BOOL Manager::GetSendToAddress const PString &  SsMcuToken,
PIPSocket::Address &  address,
PINDEX &  portNo
 

Return the send to address that is stored in this class instance

PString Manager::GetStatusInfo const PString &  token  )  [inline]
 

Request manager to provide status information on the call matching this specific token

void Manager::Main  ) 
 

The entry point, where the main control loop sits

PString Manager::ProcessStatusQuery PStringArray &  cmds  ) 
 

Get the status on all conferences, or just one conference

void Manager::RejectThisCall const PString &  uniqueCallId  )  [inline]
 

Advise the manager to reject this call, which has a particular callId

void Manager::RemoveAllCalls  )  [protected]
 

Go through the list of active calls, and tell them to "die now"

void Manager::RemoveConferenceRoomId PString  roomId  ) 
 

Cause the PSafePtr<ConferenceRoom> of the specified id to be removed from the activeRooms list in a threadsafe fashion

Comms * Manager::RemoveFromPreCallQueue const PString &  preferredId  ) 
 

Grab the instances of comms from the Pre Call Queue. Note that the PreCallQueue contains Comms instances generated by RequestNewId commands

void Manager::RemoveGarbageCollector  )  [protected]
 

Remove and terminate the garbage collector thread

void Manager::RemoveMemberId PString  memberId  ) 
 

Cause the PSafePtr<Member> of the specified id to be removed from the activeMembers list in a threadsafe fashion

void Manager::RequestNewId const PString &  requester,
PStringArray &  cmds
 

Allocate a new ID, place it in the pending list (nodesMakingNewCalls) and reply with the id to the controller who made this request. Also causes a PSafePtr<Member> to be added to the activeMembers list in a threadsafe fashion.

BOOL Manager::WaitUntilSupervisorOk  ) 
 

Wait (up to 1 second) to see if the supervisor is installed and connected OK.


Member Data Documentation

MessageFrameList Manager::activeCalls [protected]
 

A list of Comms instances that are currently in a call. That is, Comms instances who are talking with a remote Sofa Switch entity

MemberDict Manager::activeMembers [protected]
 

List of available members in the system, which is all calls + file members

Manager::ConferenceRoomDict Manager::activeRooms [protected]
 

The thread safe list of conference rooms that we manage

PAtomicInteger Manager::bogusIdCount [protected]
 

count of the number of calls that started badly. It is used to created a bogus Id

PString Manager::controllerId [protected]
 

The unique ID that identifies the remote controller who is responsible for the overview of this sofaswitch

MessageFrameList Manager::destroyTheseCalls [protected]
 

A list of MessageFrame instances that we are currently destroying. These MessageFrame instances have been used in previous calls, and have to be deleted be a separate thread

PThread* Manager::garbageCollector [protected]
 

The thread which runs every second to look for TCPConnections to delete

PSyncPoint Manager::garbageExit [protected]
 

The syncpoint that flags when we exit, and is used to time the 1 second gaps between cleaning

LaunchNewId& Manager::lid [protected]
 

The interface to the external script which runs python, to provide comms for us

MessageFrameList Manager::nodesMakingCalls [protected]
 

A list of the nodes who are initiating calls through us

PString Manager::ourId [protected]
 

The description of who we are, which is used when logging in to the server

PString Manager::ourPassword [protected]
 

An enity which could be used when logging in to the server

CommsProvider* Manager::runningComms [protected]
 

The list of initialised, ready to go, Comms instances

Supervisor& Manager::supervisor [protected]
 

The manager of the comms with remote controller. It allows the calls to be setup

PSyncPoint Manager::syncPoint [protected]
 

Sync point that can be called to end the whole thing


The documentation for this class was generated from the following files:
Generated on Sun Jan 29 19:49:32 2006 for Sofa Switch Multipoint Conf. Utility by  doxygen 1.4.4