Home | Trees | Indices | Help |
|
---|
|
Universal stanza handler/router class.
Provides facilities to set up custom handlers for various types of stanzas.
|
|||
|
|||
bool
|
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
threading.RLock |
lock lock object used to synchronize access to the StanzaProcessor object. |
||
JID |
me local JID. |
||
JID |
peer remote endpoint JID. |
||
bool
|
process_all_stanzas when True then all stanzas received (and
not only those addressed to me) are considered local.
|
||
StanzaRoute |
uplink object to route outgoing stanzas through |
|
|
|
Process IQ stanza of type 'response' or 'error'. 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 if it is "get" or "set".
|
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 if it is "get" or "set".
|
True .
|
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 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.
|
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.
|
Check "to" attribute of received stream header. Should be overriden in derived classes which require other logic for handling that attribute.
|
Set response handler for an IQ "get" or "set" stanza. This should be called before the stanza is sent.
|
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. |
|
Send a stanza somwhere. The default implementation sends it via the uplink if it is defined or raises the NoRouteError.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Jul 10 09:22:51 2011 | http://epydoc.sourceforge.net |