class JBStreamSet

A set of streams to be processed in an uniform way. More...

Contains pure virtuals
Full nameTelEngine::JBStreamSet
Definition#include <libs/yjabber/yatejabber.h>
InheritsTelEngine::GenObject [public ], TelEngine::Mutex [public ]
Inherited byJBStreamSetProcessor, JBStreamSetReceive
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods

Protected Members


Detailed Description

This class holds a set of streams to be processed in an uniform way. This is a base class for specialized stream list processors. Its process() method should be called in its own thread

 ~JBStreamSet ()

~JBStreamSet

[virtual]

Destructor. Delete the owned streams. Remove from owner

inline ObjList&  clients ()

clients

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

Returns: The list of clients

bool  add (JBStream* client)

add

[virtual]

Add a stream to the set. The stream's reference counter will be increased. This method doesn't check if the stream is already added

Parameters:
clientThe stream to append

Returns: True on success, false if there is no more room in this set

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

remove

[virtual]

Remove a stream from set

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

Returns: True on success, false if not found

unsigned int  dropAll (const JabberID& local = JabberID::empty(), const JabberID& remote = JabberID::empty(), XMPPError::Type error = XMPPError::NoError, const char* reason = 0)

dropAll

Terminate all streams matching local/remote jid

Parameters:
localOptional local jid to match
remoteOptional remote jid to match
errorOptional error to be sent to the client
reasonOptional error text to be sent to the client

Returns: The number of streams terminated

void  run ()

run

Process the list. Returns as soon as there are no more streams in the list

bool  start ()

start

[virtual]

Start running

Returns: True on success

void  stop ()

stop

[virtual]

Stop running

 JBStreamSet (JBStreamSetList* owner)

JBStreamSet

[protected]

Constructor

Parameters:
ownerThe list owning this set

bool  process (JBStream& stream)

process

[protected pure virtual]

This method is called from run() with the list unlocked and stream's reference counter increased. A specialized processor must implement this method

Parameters:
streamThe stream to process

Returns: True if something was processed

bool m_changed

m_changed

[protected]

bool m_exiting

m_exiting

[protected]

JBStreamSetList* m_owner

m_owner

[protected]

ObjList m_clients

m_clients

[protected]


Generated by: paulc on bussard on Sun Oct 20 21:06:06 2013, using kdoc 2.0a54.