From 652be6b00e5b02deca44e291de640762b26a66e3 Mon Sep 17 00:00:00 2001 From: Nuno Santos Date: Fri, 16 May 2008 01:33:21 +0000 Subject: 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 --- python/qpid/management.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'python') 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) -- cgit v1.2.1