diff options
author | Rafael H. Schloming <rhs@apache.org> | 2009-09-23 12:30:49 +0000 |
---|---|---|
committer | Rafael H. Schloming <rhs@apache.org> | 2009-09-23 12:30:49 +0000 |
commit | 2d25b7496207e62c98386b96506d49f4311c4d49 (patch) | |
tree | 6c8d2f084dc7b61cb2aec0519ec1021313dc50db /python/qpid/messaging.py | |
parent | 7286c00b988ef9b1bdf16a62e3527d62ca123a7a (diff) | |
download | qpid-python-2d25b7496207e62c98386b96506d49f4311c4d49.tar.gz |
switched API over to select based driver; added address parser
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@818075 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/messaging.py')
-rw-r--r-- | python/qpid/messaging.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/python/qpid/messaging.py b/python/qpid/messaging.py index d755aa5054..84653a56ff 100644 --- a/python/qpid/messaging.py +++ b/python/qpid/messaging.py @@ -77,7 +77,8 @@ class Connection: """ @static - def open(host, port=None): + def open(host, port=None, username="guest", password="guest", + mechanism="PLAIN", heartbeat=None): """ Creates an AMQP connection and connects it to the given host and port. @@ -88,11 +89,12 @@ class Connection: @rtype: Connection @return: a connected Connection """ - conn = Connection(host, port) + conn = Connection(host, port, username, password, mechanism, heartbeat) conn.connect() return conn - def __init__(self, host, port=None): + def __init__(self, host, port=None, username="guest", password="guest", + mechanism="PLAIN", heartbeat=None): """ Creates a connection. A newly created connection must be connected with the Connection.connect() method before it can be started. @@ -106,6 +108,11 @@ class Connection: """ self.host = host self.port = default(port, AMQP_PORT) + self.username = username + self.password = password + self.mechanism = mechanism + self.heartbeat = heartbeat + self.started = False self.id = str(uuid4()) self.session_counter = 0 |