twisted.words.protocols.jabber.xmlstreamView Source (View In Hierarchy)
XMPP XML Stream protocol handler.
|Instance Variable||version||XML stream version as a tuple (major, minor). Initially, this is set to the
minimally supported version. Upon receiving the stream header of the peer,
it is set to the minimum of that value and the version on the received
header. (type: (
|Instance Variable||namespace||default namespace URI for stream (type:
|Instance Variable||thisEntity||JID of this entity (type:
|Instance Variable||otherEntity||JID of the peer entity (type:
|Instance Variable||sid||session identifier (type:
|Instance Variable||initiating||True if this is the initiating stream (type:
|Instance Variable||features||map of (uri, name) to stream features element received from the receiving
|Instance Variable||prefixes||map of URI to prefixes that are to appear on stream header. (type:
|Instance Variable||initializers||list of stream initializer objects (type:
|Instance Variable||authenticator||associated authenticator that uses
|Method||reset||Reset XML Stream.|
|Method||onStreamError||Called when a stream:error element has been received.|
|Method||sendHeader||Send stream header.|
|Method||sendFooter||Send stream footer.|
|Method||sendStreamError||Send stream level error.|
|Method||send||Send data over the stream.|
|Method||connectionMade||Called when a connection is made.|
|Method||onDocumentStart||Called when the stream header has been received.|
Inherited from XmlStream:
|Method||dataReceived||Called whenever data is received.|
|Method||connectionLost||Called when the connection is shut down.|
|Method||onElement||Called whenever a direct child element of the root element has been received.|
|Method||onDocumentEnd||Called whenever the end tag of the root element has been received.|
|Method||setDispatchFn||Set another function to handle elements.|
|Method||resetDispatchFn||Set the default function (
|Method||_initializeStream||Sets up XML Parser.|
|Method||logPrefix||Return a prefix matching the class name, to identify log messages related to this protocol instance.|
|Method||makeConnection||Make a connection to a transport and a server.|
|Method||addOnetimeObserver||Register a one-time observer for an event.|
|Method||addObserver||Register an observer for an event.|
|Method||removeObserver||Remove callable as observer for an event.|
|Method||dispatch||Dispatch an event.|
listof objects that provide
Reset XML Stream.
Resets the XML Parser for incoming data. This is to be used after successfully negotiating a new layer, e.g. TLS and SASL. Note that registered event observers will continue to be in place.
Send stream header.
Send stream footer.
Send stream level error.
If we are the receiving entity, and haven't sent the header yet, we sent one first.
After sending the stream error, the stream is closed and the transport connection dropped.
|Parameters||streamError||stream error instance (type: |
Called when a connection is made.
Notifies the authenticator when a connection has been made.
Called when the stream header has been received.
Extracts the header's
attributes from the root element. The
id attribute is stored
sid attribute and the
version attribute is
parsed and the minimum of the version we sent and the parsed
version attribute is stored as a tuple (major, minor) in this
version attribute. If no
was present, we assume version 0.0.
If appropriate (we are the initiating stream and the minimum of our and
the other party's version is at least 1.0), a one-time observer is
registered for getting the stream features. The registered function is
Ultimately, the authenticator's
streamStarted method will
|Parameters||rootElement||The root element. (type: |