class JBStreamSetList

A list of stream sets. More...

Full nameTelEngine::JBStreamSetList
Definition#include <libs/yjabber/yatejabber.h>
InheritsTelEngine::Mutex [public ], TelEngine::RefObject [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods

Protected Members


Detailed Description

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)

JBStreamSetList

Constructor

Parameters:
engineEngine owning this list
maxMaximum streams per set (0 for maximum possible)
sleepMsTime to sleep when idle
nameList name (for debugging purposes)

inline ObjList&  sets ()

sets

Retrieve the stream set list. Make sure the list is locked before calling this method

Returns: The stream set list

 ~JBStreamSetList ()

~JBStreamSetList

[virtual]

Destructor

inline unsigned int  maxStreams ()

maxStreams

[const]

Retrieve the maximum number of streams per set

Returns: The maximum number of streams per set

inline unsigned int  streamCount ()

streamCount

[const]

Retrieve the number of streams in all sets

Returns: The number of streams in all sets

inline JBEngine*  engine ()

engine

[const]

Retrieve the engine owning this list

Returns: The engine owning this list

bool  add (JBStream* client)

add

Add a stream to the list. Build a new set if there is no room in existing sets

Parameters:
clientThe stream to add

Returns: True on success

void  remove (JBStream* client, bool delObj = true)

remove

Remove a stream from list

Parameters:
clientThe stream to remove
delObjTrue to release the stream, false to remove it from list without releasing it

void  stop (JBStreamSet* set = 0, bool waitTerminate = true)

stop

Stop one set or all sets

Parameters:
setThe set to stop, 0 to stop all
waitTerminateTrue to wait for all streams to terminate

const String&  toString ()

toString

[const virtual]

Get the string representation of this list

Returns: The list name

Reimplemented from GenObject.

void  destroyed ()

destroyed

[protected virtual]

Stop all sets. Release memory

Reimplemented from RefObject.

void  remove (JBStreamSet* set)

remove

[protected]

Remove a set from list without deleting it

Parameters:
setThe set to remove

JBStreamSet*  build ()

build

[protected virtual]

Build a specialized stream set. Descendants must override this method

Returns: JBStreamSet pointer or 0

JBEngine* m_engine

m_engine

[protected]

String m_name

m_name

[protected]

unsigned int m_max

m_max

[protected]

unsigned int m_sleepMs

m_sleepMs

[protected]

ObjList m_sets

m_sets

[protected]


Generated by: paulc on bussard on Fri Apr 1 18:17:10 2011, using kdoc 2.0a54.