pyxmpp2.simple.FireAndForget

Package pyxmpp2 :: Module simple :: Class FireAndForget |
[hide private]

# Class FireAndForget

A minimal XMPP client that just connects to a server and runs single function.

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

Instance Methods | [hide private]
__init__(self, local_jid, action, settings) x.__init__(...) initializes x; see help(type(x)) for signature |
run(self) Request client connection and start the main loop. |
disconnect(self) Request disconnection and let the main loop run for a 2 more seconds for graceful disconnection. |
handle_authorized(self, event) Send the initial presence after log-in. |
handle_disconnected(self, event) Quit the main loop upon disconnection. |
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables | [hide private]
Inherited from `mainloop.interfaces.EventHandler`: `__abstractmethods__` Inherited from `mainloop.interfaces.EventHandler` (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, local_jid, action, settings) (Constructor) |
x.__init__(...) initializes x; see help(type(x)) for signature Parameters: `action` (a callable accepting a single 'client' argument) - the function to run after the stream is authorized `client` (pyxmpp2.client.Client) - a Client instance to do the rest of the job Overrides: object.__init__ (inherited documentation)

### handle_authorized(self, event) |
Send the initial presence after log-in. Decorators: `@event_handler(AuthorizedEvent)`

### handle_disconnected(self, event) |
Quit the main loop upon disconnection. Decorators: `@event_handler(DisconnectedEvent)`