Root Stanza¶
- class slixmpp.stanza.rootstanza.RootStanza(stream=None, xml=None, stype=None, sto=None, sfrom=None, sid=None, parent=None, recv=False)[source]¶
A top-level XMPP stanza in an XMLStream.
The RootStanza class provides a more XMPP specific exception handler than provided by the generic StanzaBase class.
- Methods:
exception – Overrides StanzaBase.exception
- exception(e)[source]¶
Create and send an error reply.
Typically called when an event handler raises an exception. The error’s type and text content are based on the exception object’s type and content.
Overrides StanzaBase.exception.
- Arguments:
e – Exception object
- plugin_attrib_map: ClassVar[Dict[str, Type[ElementBase]]] = {'error': <class 'slixmpp.stanza.error.Error'>}¶
A mapping of the
plugin_attrib
values of registered plugins to their respective classes.
- plugin_iterables: ClassVar[Set[Type[ElementBase]]] = {}¶
The set of stanza classes that can be iterated over using the ‘substanzas’ interface. Classes are added to this set when registering a plugin with
iterable=True
:register_stanza_plugin(DiscoInfo, DiscoItem, iterable=True)
Added in version 1.0-Beta5.
- plugin_overrides: ClassVar[Dict[str, str]] = {}¶
A map of interface operations to the overriding functions. For example, after overriding the
set
operation for the interfacebody
,plugin_overrides
would be:{'set_body': <some function>}
- plugin_tag_map: ClassVar[Dict[str, Type[ElementBase]]] = {'{jabber:client}error': <class 'slixmpp.stanza.error.Error'>}¶
A mapping of root element tag names (in
'{namespace}elementname'
format) to the plugin classes responsible for them.