pyxmpp2.session.SessionHandler

Package pyxmpp2 :: Module session :: Class SessionHandler |
[hide private]

# Class SessionHandler

RFC 3921 session establishment implementation.

Nested Classes | [hide private]
Inherited from `interfaces.StreamFeatureHandler`: `__metaclass__`

Instance Methods | [hide private]
__init__(self, settings=None) Initialize the SASL handler |
make_stream_features(self, stream, features) Update the features element announced by the stream. |
handle_stream_features(self, stream, features) Handle features announced by the stream peer. |
handle_authorized(self, event) Send session esteblishment request if the feature was advertised by the server. |
_session_success(self, stanza) Handle session establishment success. |
_session_error(self, stanza) Handle resource session establishment error. |
handle_bind_iq_set(self, stanza) Handler <iq type="set"/> for session establishment. |
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables | [hide private]
Inherited from `interfaces.StreamFeatureHandler`: `__abstractmethods__` Inherited from `interfaces.StreamFeatureHandler` (private): `_abc_cache`, `_abc_negative_cache`, `_abc_negative_cache_version`, `_abc_registry`

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

Method Details | [hide private]

### __init__(self, settings=None) (Constructor) |
Initialize the SASL handler Overrides: object.__init__

### make_stream_features(self, stream, features) |
Update the features element announced by the stream. [receiver only] Parameters: `stream` - the stream `features` - the features element about to be sent Overrides: interfaces.StreamFeatureHandler.make_stream_features (inherited documentation)

### handle_stream_features(self, stream, features) |
Handle features announced by the stream peer. [initiator only] Parameters: `stream` - the stream `features` - the features element just received Returns: StreamFeatureHandled instance if a feature was recognized and handled StreamFeatureNotHandled instance if a feature was recognized but not handled `None` if no feature was recognized Overrides: interfaces.StreamFeatureHandler.handle_stream_features (inherited documentation)

### handle_authorized(self, event) |
Send session esteblishment request if the feature was advertised by the server. Decorators: `@event_handler(AuthorizedEvent)`

### _session_success(self, stanza) |
Handle session establishment success. [initiating entity only] Parameters: `stanza` - <iq type="result"/> stanza received.

### _session_error(self, stanza) |
Handle resource session establishment error. [initiating entity only] Raises: `FatalStreamError`

### handle_bind_iq_set(self, stanza) |
Handler <iq type="set"/> for session establishment. Decorators: `@iq_set_stanza_handler(XMLPayload, SESSION_TAG)`