|
|
This class implements a Jabber server engine
| JBServerEngine (const char* name = "jbserverengine")
| JBServerEngine |
Constructor
Parameters:
| name | Engine name |
| ~JBServerEngine ()
| ~JBServerEngine |
Destructor
| void cleanup (bool final = false, bool waitTerminate = true)
| cleanup |
[virtual]
Terminate all streams. Stop all sets processors. Release memory if final
Parameters:
| final | True if called from destructor |
| waitTerminate | True to wait for all streams to terminate |
Reimplemented from JBEngine.
| void buildStreamName (String& name, const JBStream* stream)
| buildStreamName |
[virtual]
Build an internal stream name
Parameters:
| name | Destination buffer |
| stream | Stream requesting it |
Reimplemented from JBEngine.
| JBServerStream* findServerStream (const String& local, const String& remote, bool out,
bool auth = true)
| findServerStream |
Find a server to server or component stream by local/remote domain. Skip over outgoing dialback only streams This method is thread safe
Parameters:
| local | Local domain |
| remote | Remote domain |
| out | True to find an outgoing stream, false to find an incoming one. Ignored for component streams |
| auth | Check if the remote domain of an incoming s2s stream is authenticated |
Returns: Referenced JBServerStream pointer or 0
| JBServerStream* createServerStream (const String& local, const String& remote,
const char* dbId = 0, const char* dbKey = 0, bool dbOnly = false,
const NamedList* params = 0)
| createServerStream |
Create an outgoing s2s stream.
Parameters:
| local | Local party domain |
| remote | Remote party domain |
| dbId | Optional dialback id (stream id) |
| dbKey | Optional dialback key to verify |
| dbOnly | True if this is a dialback only stream |
| params | Optional stream parameters |
Returns: Referenced JBServerStream pointer or 0 if a stream already exists
| JBClusterStream* findClusterStream (const String& remote, JBClusterStream* skip = 0)
| findClusterStream |
Find a cluster stream by remote domain. This method is thread safe
Parameters:
| remote | Remote jid |
| skip | Optional stream to skip |
Returns: Referenced JBClusterStream pointer or 0
| JBClusterStream* createClusterStream (const String& local,
const String& remote, const NamedList* params = 0)
| createClusterStream |
[virtual]
Create an outgoing cluster stream. This method is thread safe
Parameters:
| local | Local party domain |
| remote | Remote party domain |
| params | Optional stream parameters |
Returns: Referenced JBClusterStream pointer or 0 if a stream already exists
| unsigned int terminateClientStreams (const JabberID& jid,
XMPPError::Type error = XMPPError::NoError, const char* reason = 0)
| terminateClientStreams |
Terminate all incoming c2s streams matching a given JID This method is thread safe
Parameters:
| jid | Client JID |
| error | Optional error to be sent to the client |
| reason | Optional error text to be sent to the client |
Returns: The number of stream terminated
| void addStream (JBStream* stream)
| addStream |
[protected virtual]
Add a stream to one of the stream lists
Parameters:
| stream | The stream to add |
Reimplemented from JBEngine.
| void removeStream (JBStream* stream, bool delObj = true)
| removeStream |
[protected virtual]
Remove a stream
Parameters:
| stream | The stream to remove |
| delObj | True to release the stream, false to remove it from list without releasing it |
Reimplemented from JBEngine.
| void stopStreamSets (bool waitTerminate = true)
| stopStreamSets |
[protected virtual]
Stop all stream sets
Parameters:
| waitTerminate | True to wait for all streams to terminate |
Reimplemented from JBEngine.
| void getStreamList (RefPointer | getStreamList |
[protected virtual]
Retrieve the list of streams of a given type
Parameters:
| list | The destination list to set |
| type | Stream type |
Reimplemented from JBEngine.
| void getStreamListsType (int type, RefPointer | getStreamListsType |
[protected virtual]
Retrieve the stream lists of a given type
Parameters:
| type | Stream type |
| recv | Receive stream list to set |
| process | Process stream list to set |
| inline unsigned int getStreamIndex ()
| getStreamIndex |
[protected]
Increment and return the stream index counter
Returns: Current stream index
| unsigned int m_streamIndex | m_streamIndex |
[protected]
| JBStreamSetList* m_c2sReceive | m_c2sReceive |
[protected]
| JBStreamSetList* m_c2sProcess | m_c2sProcess |
[protected]
| JBStreamSetList* m_s2sReceive | m_s2sReceive |
[protected]
| JBStreamSetList* m_s2sProcess | m_s2sProcess |
[protected]
| JBStreamSetList* m_compReceive | m_compReceive |
[protected]
| JBStreamSetList* m_compProcess | m_compProcess |
[protected]
| JBStreamSetList* m_clusterReceive | m_clusterReceive |
[protected]
| JBStreamSetList* m_clusterProcess | m_clusterProcess |
[protected]
| Generated by: paulc on bussard on Tue Apr 12 17:15:21 2011, using kdoc 2.0a54. |