From 42ff3ed764be27d4611dce93c1f7fe4805aba533 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Mon, 12 May 2008 19:45:22 +0000 Subject: QPID-1052: Patch from Ted Ross This patch contains the following: 1) The session-id reported by the management API now matches the session.name in the session table 2) management.py API has a new callback for closed connections 3) qpid-tool uses the closed-connection handler to notify the user of a lost connection git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@655619 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/python/commands/qpid-tool | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'qpid/python/commands') diff --git a/qpid/python/commands/qpid-tool b/qpid/python/commands/qpid-tool index 1aee3a1b7f..9977db3518 100755 --- a/qpid/python/commands/qpid-tool +++ b/qpid/python/commands/qpid-tool @@ -31,16 +31,23 @@ from qpid.peer import Closed class Mcli (Cmd): """ Management Command Interpreter """ - prompt = "qpid: " def __init__ (self, dataObject, dispObject): Cmd.__init__ (self) self.dataObject = dataObject self.dispObject = dispObject + self.dataObject.setCli (self) + self.prompt = "qpid: " def emptyline (self): pass + def setPromptMessage (self, p): + if p == None: + self.prompt = "qpid: " + else: + self.prompt = "qpid[%s]: " % p + def do_help (self, data): print "Management Tool for QPID" print -- cgit v1.2.1