pyxmpp2.interfaces.XMPPTransport

Package pyxmpp2 :: Module interfaces :: Class XMPPTransport |
[hide private]

# Class XMPPTransport

Abstract base class for XMPP transport implementations.

Nested Classes | [hide private]
| __metaclass__ Metaclass for defining Abstract Base Classes (ABCs).

Instance Methods | [hide private]
set_target(self, stream) Make the `stream` the target for this transport instance. |
send_stream_head(self, stanza_namespace, stream_from, stream_to, stream_id=None, version=`u'``1.0``'`, language=None) Send stream head via the transport. |
restart(self) Restart the stream after SASL or StartTLS handshake. |
send_stream_tail(self) Send stream tail via the transport. |
send_element(self, element) Send an element via the transport. |
is_connected(self) Check if the transport is connected. |
disconnect(self) Gracefully disconnect the connection. |
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__init__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables | [hide private]
| __abstractmethods__ = ``frozenset([``])``
| _abc_cache = `<_weakrefset.WeakSet object at 0x85cabcc>`
| _abc_negative_cache = `<_weakrefset.WeakSet object at 0x85cac0c>`
| _abc_negative_cache_version = `10`
| _abc_registry = `<_weakrefset.WeakSet object at 0x85cab6c>`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### set_target(self, stream) |
Make the `stream` the target for this transport instance. The 'stream_start', 'stream_end' and 'stream_element' methods of the target will be called when appropriate content is received. Parameters: `stream` (StreamBase) - the stream handler to receive stream content from the transport

### send_stream_head(self, stanza_namespace, stream_from, stream_to, stream_id=None, version=`u'``1.0``'`, language=None) |
Send stream head via the transport. Parameters: `stanza_namespace` (`unicode`) - namespace of stream stanzas (e.g. 'jabber:client') `stream_from` (`unicode`) - the 'from' attribute of the stream. May be `None`. `stream_to` (`unicode`) - the 'to' attribute of the stream. May be `None`. `version` (`unicode`) - the 'version' of the stream. `language` (`unicode`) - the 'xml:lang' of the stream

### restart(self) |
Restart the stream after SASL or StartTLS handshake. For the initiator a new call to send_stream_head is required too.

### is_connected(self) |
Check if the transport is connected. Returns: `True` if is connected.