t.w.p.j.x.XMPPHandler(object) : class documentation

Part of twisted.words.protocols.jabber.xmlstream View Source View In Hierarchy

Implements interfaces: twisted.words.protocols.jabber.ijabber.IXMPPHandler

XMPP protocol handler.

Classes derived from this class implement (part of) one or more XMPP extension protocols, and are referred to as a subprotocol implementation.

Method __init__ Undocumented
Method setHandlerParent Set the parent of the handler.
Method disownHandlerParent Remove the parent of the handler.
Method makeConnection A connection over the underlying transport of the XML stream has been established.
Method connectionMade Called after a connection has been established.
Method connectionInitialized The XML stream has been initialized.
Method connectionLost The XML stream has been closed.
Method send Send data over the managed XML stream.
def __init__(self): (source)
Undocumented
def setHandlerParent(self, parent): (source)
Set the parent of the handler.
def disownHandlerParent(self, parent): (source)
Remove the parent of the handler.
def makeConnection(self, xs): (source)
A connection over the underlying transport of the XML stream has been established.

At this point, no traffic has been exchanged over the XML stream given in xs.

This should setup xmlstream and call connectionMade.

def connectionMade(self): (source)
Called after a connection has been established.

Can be overridden to perform work before stream initialization.

def connectionInitialized(self): (source)
The XML stream has been initialized.

Can be overridden to perform work after stream initialization, e.g. to set up observers and start exchanging XML stanzas.

def connectionLost(self, reason): (source)
The XML stream has been closed.

This method can be extended to inspect the reason argument and act on it.

def send(self, obj): (source)
Send data over the managed XML stream.
Parametersobjdata to be sent over the XML stream. This is usually an object providing domish.IElement, or serialized XML. See xmlstream.XmlStream for details.
NoteThe stream manager maintains a queue for data sent using this method when there is no current initialized XML stream. This data is then sent as soon as a new stream has been established and initialized. Subsequently, connectionInitialized will be called again. If this queueing is not desired, use send on self.xmlstream.
API Documentation for Twisted, generated by pydoctor at 2012-09-01 11:44:56.