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__

Instance Variables [hide private]
a callable accepting a single 'client' argument action
the function to run after the stream is authorized
pyxmpp2.client.Client client
a Client instance to do the rest of the job
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
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)