pyxmpp2.binding.ResourceBindingHandler

Package pyxmpp2 :: Module binding :: Class ResourceBindingHandler |
[hide private]

# Class ResourceBindingHandler

Resource binding implementation.

To be used as one of the handlers passed to a stream class constructor.

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) Add resource binding feature to the <features/> element of the stream. |
handle_stream_features(self, stream, features) Process incoming <stream:features/> element. |
bind(self, stream, resource) Bind to a resource. |
_bind_success(self, stanza) Handle resource binding success. |
_bind_error(self, stanza) Handle resource binding success. |
handle_bind_iq_set(self, stanza) Handler <iq type="set"/> for resource binding. |
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) |
Add resource binding feature to the <features/> element of the stream. [receving entity only] Parameters: `stream` - the stream `features` - the features element about to be sent Returns: update <features/> element. Overrides: interfaces.StreamFeatureHandler.make_stream_features

### handle_stream_features(self, stream, features) |
Process incoming <stream:features/> element. [initiating entity only] The received features element is available in `features`. 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

### bind(self, stream, resource) |
Bind to a resource. [initiating entity only] XMPP stream is authenticated for bare JID only. To use the full JID it must be bound to a resource. Parameters: `resource` (`unicode`) - the resource name to bind to.

### _bind_success(self, stanza) |
Handle resource binding success. [initiating entity only] Set streambase.StreamBase.me to the full JID negotiated. Parameters: `stanza` - <iq type="result"/> stanza received.

### _bind_error(self, stanza) |
Handle resource binding success. [initiating entity only] Raises: `FatalStreamError`

### handle_bind_iq_set(self, stanza) |
Handler <iq type="set"/> for resource binding. Decorators: `@iq_set_stanza_handler(ResourceBindingPayload)`