diff options
| author | Nuno Santos <nsantos@apache.org> | 2008-05-16 01:33:21 +0000 |
|---|---|---|
| committer | Nuno Santos <nsantos@apache.org> | 2008-05-16 01:33:21 +0000 |
| commit | 652be6b00e5b02deca44e291de640762b26a66e3 (patch) | |
| tree | 5058e7500a79a983c41df9a70d63c0b11f50af39 /python | |
| parent | 9a3d8ad1695d1b7f2cb42d77c6106245c521566c (diff) | |
| download | qpid-python-652be6b00e5b02deca44e291de640762b26a66e3.tar.gz | |
QPID-1061: Management heartbeat message from broker -- applied patch supplied by Ted Ross
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@656918 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python')
| -rw-r--r-- | python/qpid/management.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/python/qpid/management.py b/python/qpid/management.py index 6f68981e4c..2ca433e6d2 100644 --- a/python/qpid/management.py +++ b/python/qpid/management.py @@ -170,6 +170,7 @@ class managementClient: CTRL_BROKER_INFO = 1 CTRL_SCHEMA_LOADED = 2 CTRL_USER = 3 + CTRL_HEARTBEAT = 4 SYNC_TIME = 10.0 @@ -304,6 +305,8 @@ class managementClient: self.handlePackageInd (ch, codec) elif hdr[0] == 'q': self.handleClassInd (ch, codec) + elif hdr[0] == 'h': + self.handleHeartbeat (ch, codec) else: self.parse (ch, codec, hdr[0], hdr[1]) ch.accept(msg) @@ -549,6 +552,11 @@ class managementClient: smsg = ch.message(sendCodec.encoded) ch.send ("qpid.management", smsg) + def handleHeartbeat (self, ch, codec): + timestamp = codec.read_uint64() + if self.ctrlCb != None: + self.ctrlCb (ch.context, self.CTRL_HEARTBEAT, timestamp) + def parseSchema (self, ch, codec): """ Parse a received schema-description message. """ self.decOutstanding (ch) |
