AmSessionContainer Class Reference

Centralized session container. More...

#include <AmSessionContainer.h>

Inheritance diagram for AmSessionContainer:

AmThread

Public Member Functions

AmSessioncreateSession (AmSipRequest &req)
bool addSession (const string &callid, const string &remote_tag, const string &local_tag, AmSession *session)
bool addSession (const string &local_tag, AmSession *session)
void startSessionUAS (AmSipRequest &req)
AmSessionstartSessionUAC (AmSipRequest &req)
void destroySession (AmSession *s)
void destroySession (const string &local_tag)
int getSize ()
bool postEvent (const string &callid, const string &remote_tag, AmEvent *event)
bool postEvent (const string &local_tag, AmEvent *event)

Static Public Member Functions

static AmSessionContainerinstance ()

Detailed Description

Centralized session container.

This is the register for all active and dead sessions. If has a deamon which wakes up only if it has work. Then, it kills all dead sessions and try to go to bed (it cannot sleep if one or more sessions are still alive).


Member Function Documentation

bool AmSessionContainer::addSession ( const string &  local_tag,
AmSession session 
)

Adds a session to the container.

Returns:
true if the session is new within the container.

bool AmSessionContainer::addSession ( const string &  callid,
const string &  remote_tag,
const string &  local_tag,
AmSession session 
)

Adds a session to the container (UAS only).

Returns:
true if the session is new within the container.

AmSession * AmSessionContainer::createSession ( AmSipRequest req  ) 

Creates a new session.

Parameters:
req local request
Returns:
a new session or NULL on error.

void AmSessionContainer::destroySession ( AmSession s  ) 

Detroys a session.

int AmSessionContainer::getSize (  ) 

Query the number of active sessions

bool AmSessionContainer::postEvent ( const string &  local_tag,
AmEvent event 
)

post a generic event into the event queue of the identified dialog. sess_key is local_tag (to_tag) note: if hash_str is known, use postGenericEvent(hash_str,sess_key,event); for better performance.

Returns:
false if session doesn't exist

bool AmSessionContainer::postEvent ( const string &  callid,
const string &  remote_tag,
AmEvent event 
)

post an event into the event queue of the identified dialog.

Returns:
false if session doesn't exist

AmSession * AmSessionContainer::startSessionUAC ( AmSipRequest req  ) 

Constructs a new session and adds it to the active session container.

Parameters:
req client's request

void AmSessionContainer::startSessionUAS ( AmSipRequest req  ) 

Constructs a new session and adds it to the active session container.

Parameters:
req client's request


The documentation for this class was generated from the following files:
Generated on Thu Mar 8 00:12:46 2007 for Sems by  doxygen 1.4.7
Home |  Recent changes |  Search |  Glossary |  Sitemap |  Login