Part of twisted.words.protocols.jabber.xmlstream View Source View In Hierarchy
Known subclasses: twisted.words.protocols.jabber.component.ListenComponentAuthenticator, twisted.words.protocols.jabber.xmlstream.ConnectAuthenticator
Base class for business logic of initializing an XmlStream
Subclass this object to enable an XmlStream to initialize and authenticate to different types of stream hosts (such as clients, components, etc.).
Rules:STREAM_AUTHD_EVENT
when the stream has been completely initialized.
associateWithStream
is called.
streamStarted
,
and start initialization there.
Instance Variables | xmlstream | The XmlStream that needs authentication
(type: XmlStream
) |
Note | the term authenticator is historical. Authenticators perform all steps required to prepare the stream for the exchange of XML stanzas. |
Method | __init__ | Undocumented |
Method | connectionMade | Called by the XmlStream when the underlying socket connection is |
Method | streamStarted | Called by the XmlStream when the stream has started. |
Method | associateWithStream | Called by the XmlStreamFactory when a connection has been made |
Called by the XmlStream when the underlying socket connection is in place.
This allows the Authenticator to send an initial root element, if it's connecting, or wait for an inbound root from the peer if it's accepting the connection.
Subclasses can use self.xmlstream.send() to send any initial data to the peer.Called by the XmlStream when the stream has started.
A stream is considered to have started when the root element has been received and, if applicable, the feature set has been received.Called by the XmlStreamFactory when a connection has been made to the requested peer, and an XmlStream object has been instantiated.
The default implementation just saves a handle to the new XmlStream.Parameters | xmlstream | The XmlStream that will be passing events to this Authenticator.
(type: XmlStream
) |