Listeners¶
pymco.listeners
¶
stomp.py listeners for python-mcollective.
-
class
pymco.listener.
CurrentHostPortListener
(*args, **kwargs)[source]¶ Listener tracking current host and port.
Some connectors, like ActiveMQ connector, may provide different user and password for each host, so we need track the current host and port in order to be able to get the right user and password when logging.
-
class
pymco.listener.
ResponseListener
(config, connector, count, timeout=30, condition=None, logger=<logging.Logger object>)[source]¶ Listener that waits for a message response.
Parameters: - config –
pymco.config.Config
instance. - count – number of expected messages.
- timeout – seconds we should wait for messages.
- condition – by default a
threading.Condition
object for synchronization purposes, but you can use any object implementing thewait()
method and accepting atimeout
argument.
-
on_message
(headers, body)[source]¶ Received messages hook.
Parameters: - headers – message headers.
- body – message body.
-
security
¶ Security provider property
- config –