summaryrefslogtreecommitdiff
path: root/python/qpid/delegates.py
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2009-01-08 18:27:39 +0000
committerRafael H. Schloming <rhs@apache.org>2009-01-08 18:27:39 +0000
commit5f5b7cbf6a266ae471c32b07457e38a7f11cdf46 (patch)
treedb58078e0f88220fb0388ca1662b5ba9a9763035 /python/qpid/delegates.py
parent64bd79537e385a045b3c74de95ddd19f91163a26 (diff)
downloadqpid-python-5f5b7cbf6a266ae471c32b07457e38a7f11cdf46.tar.gz
ignore hearbeat controls rather than barfing on them, also permit the heartbeat to be specified on connection creation
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@732778 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/delegates.py')
-rw-r--r--python/qpid/delegates.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/python/qpid/delegates.py b/python/qpid/delegates.py
index bf26553dda..61c8e8c326 100644
--- a/python/qpid/delegates.py
+++ b/python/qpid/delegates.py
@@ -61,6 +61,9 @@ class Delegate:
self.connection.opened = False
notify(self.connection.condition)
+ def connection_heartbeat(self, ch, hrt):
+ pass
+
def session_attach(self, ch, a):
try:
self.connection.attach(a.name, ch, self.delegate, a.force)
@@ -139,11 +142,13 @@ class Client(Delegate):
"version": "development",
"platform": os.name}
- def __init__(self, connection, username="guest", password="guest", mechanism="PLAIN"):
+ def __init__(self, connection, username="guest", password="guest",
+ mechanism="PLAIN", heartbeat=None):
Delegate.__init__(self, connection)
self.username = username
self.password = password
self.mechanism = mechanism
+ self.heartbeat = heartbeat
def start(self):
self.connection.write_header(self.spec.major, self.spec.minor)
@@ -154,7 +159,7 @@ class Client(Delegate):
ch.connection_start_ok(client_properties=Client.PROPERTIES, mechanism=self.mechanism, response=r)
def connection_tune(self, ch, tune):
- ch.connection_tune_ok()
+ ch.connection_tune_ok(heartbeat=self.heartbeat)
ch.connection_open()
def connection_open_ok(self, ch, open_ok):