|
Methods defined here:
- __init__(self, host_and_ports=[('localhost', 61613)], user=None, passcode=None, prefer_localhost=True, try_loopback_connect=True, reconnect_sleep_initial=0.10000000000000001, reconnect_sleep_increase=0.5, reconnect_sleep_jitter=0.10000000000000001, reconnect_sleep_max=60.0)
- Initialize and start this connection.
\param host_and_ports
a list of (host, port) tuples.
\param prefer_localhost
if True and the local host is mentioned in the (host,
port) tuples, try to connect to this first
\param try_loopback_connect
if True and the local host is found in the host
tuples, try connecting to it using loopback interface
(127.0.0.1)
\param reconnect_sleep_initial
initial delay in seconds to wait before reattempting
to establish a connection if connection to any of the
hosts fails.
\param reconnect_sleep_increase
factor by which the sleep delay is increased after
each connection attempt. For example, 0.5 means
to wait 50% longer than before the previous attempt,
1.0 means wait twice as long, and 0.0 means keep
the delay constant.
\param reconnect_sleep_max
maximum delay between connection attempts, regardless
of the reconnect_sleep_increase.
\param reconnect_sleep_jitter
random additional time to wait (as a percentage of
the time determined using the previous parameters)
between connection attempts in order to avoid
stampeding. For example, a value of 0.1 means to wait
an extra 0%-10% (randomly determined) of the delay
calculated using the previous three parameters.
- abort(self, headers={}, **keyword_headers)
- ack(self, headers={}, **keyword_headers)
- begin(self, headers={}, **keyword_headers)
- commit(self, headers={}, **keyword_headers)
- connect(self, headers={}, **keyword_headers)
- disconnect(self, headers={}, **keyword_headers)
- get_host_and_port(self)
- Return a (host, port) tuple indicating which STOMP host and
port is currently connected, or None if there is currently no
connection.
- get_listener(self, name)
- is_connected(self)
- remove_listener(self, name)
- send(self, message='', headers={}, **keyword_headers)
- set_listener(self, name, listener)
- start(self)
- Start the connection. This should be called after all
listeners have been registered. If this method is not called,
no frames will be received by the connection.
- stop(self)
- Stop the connection. This is equivalent to calling
disconnect() but will do a clean shutdown by waiting for the
receiver thread to exit.
- subscribe(self, headers={}, **keyword_headers)
- unsubscribe(self, headers={}, **keyword_headers)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|