Yate
|
A list of stream sets. More...
#include <yatejabber.h>
Public Member Functions | |
JBStreamSetList (JBEngine *engine, unsigned int max, unsigned int sleepMs, const char *name) | |
ObjList & | sets () |
virtual | ~JBStreamSetList () |
unsigned int | maxStreams () const |
unsigned int | streamCount () const |
JBEngine * | engine () const |
bool | add (JBStream *client) |
void | remove (JBStream *client, bool delObj=true) |
void | stop (JBStreamSet *set=0, bool waitTerminate=true) |
virtual const String & | toString () const |
Protected Member Functions | |
virtual void | destroyed () |
void | remove (JBStreamSet *set) |
virtual JBStreamSet * | build () |
Protected Attributes | |
JBEngine * | m_engine |
String | m_name |
unsigned int | m_max |
unsigned int | m_sleepMs |
ObjList | m_sets |
Friends | |
class | JBStreamSet |
A list of stream sets.
This class holds a list of stream sets. The purpose is to create a list of threads
JBStreamSetList | ( | JBEngine * | engine, |
unsigned int | max, | ||
unsigned int | sleepMs, | ||
const char * | name | ||
) |
virtual ~JBStreamSetList | ( | ) | [virtual] |
Destructor
Add a stream to the list. Build a new set if there is no room in existing sets
client | The stream to add |
virtual JBStreamSet* build | ( | ) | [protected, virtual] |
Build a specialized stream set. Descendants must override this method
virtual void destroyed | ( | ) | [protected, virtual] |
Stop all sets. Release memory
Reimplemented from RefObject.
Retrieve the engine owning this list
unsigned int maxStreams | ( | ) | const [inline] |
Retrieve the maximum number of streams per set
Remove a stream from list
client | The stream to remove |
delObj | True to release the stream, false to remove it from list without releasing it |
void remove | ( | JBStreamSet * | set | ) | [protected] |
Remove a set from list without deleting it
set | The set to remove |
Retrieve the stream set list. Make sure the list is locked before calling this method
void stop | ( | JBStreamSet * | set = 0 , |
bool | waitTerminate = true |
||
) |
Stop one set or all sets
set | The set to stop, 0 to stop all |
waitTerminate | True to wait for all streams to terminate |
unsigned int streamCount | ( | ) | const [inline] |
Retrieve the number of streams in all sets