Home | Trees | Indices | Help |
|
---|
|
Universal stanza handler/router class.
Provides facilities to set up custom handlers for various types of stanzas.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
bool
|
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
initiator : True if local stream endpoint is the initiating entity.
|
|||
lock : lock object used to synchronize access to the StanzaProcessor object. |
|||
me : local JID. |
|||
peer : remote stream endpoint JID. |
|||
process_all_stanzas : when True then all stanzas received are
considered local.
|
|
|
True .
|
Check "to" attribute of received stream header. Should be overriden in derived classes which require other logic for handling that attribute.
|
Modify incoming stanza before processing it. This implementation does nothig. It should be overriden in derived classes if needed. |
Modify outgoing stanza before sending into the stream. This implementation does nothig. It should be overriden in derived classes if needed. |
Process IQ stanza received. If a matching handler is available pass the stanza to it. Otherwise ignore it if it is "error" or "result" stanza or return "feature-not-implemented" error.
|
Process message stanza. Pass it to a handler of the stanza's type and payload namespace. If no handler for the actual stanza type succeeds then hadlers for type "normal" are used.
|
Process presence stanza. Pass it to a handler of the stanza's type and payload namespace.
|
|
Process stanza received from the stream. First "fix" the stanza with self.fix_in_stanza(), then pass it to self.route_stanza() if it is not directed to self.me and self.process_all_stanzas is not True. Otherwise stanza is passwd to self.process_iq(), self.process_message() or self.process_presence() appropriately.
|
Process stanza not addressed to us. Return "recipient-unavailable" return if it is not "error" nor "result" stanza. This method should be overriden in derived classes if they are supposed to handle stanzas not addressed directly to local stream endpoint.
|
|
Set <iq type="get"/> handler. Only one handler may be defined per one namespaced element. If a handler for the element was already set it will be lost after calling this method.
|
Set <iq type="set"/> handler. Only one handler may be defined per one namespaced element. If a handler for the element was already set it will be lost after calling this method.
|
Set a handler for <message/> stanzas. Multiple <message /> handlers with the same type/namespace/priority may be set. Order of calling handlers with the same priority is not defined. Handlers will be called in priority order until one of them returns True or any stanza(s) to send (even empty list will do).
|
Set a handler for <presence/> stanzas. Multiple <presence /> handlers with the same type/namespace/priority may be set. Order of calling handlers with the same priority is not defined. Handlers will be called in priority order until one of them returns True or any stanza(s) to send (even empty list will do).
|
Set response handler for an IQ "get" or "set" stanza. This should be called before the stanza is sent.
|
|
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun May 8 13:35:05 2011 | http://epydoc.sourceforge.net |