From 2e29faa768283390452b7d432db28d43cd4a27aa Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Wed, 31 Mar 2010 21:13:12 +0000 Subject: Merged the changes from the qmf-devel0.7a branch back to the trunk. This is a checkpoint along the QMFv2 development path. This update introduces portions of QMFv2 into the code: - The C++ agent (qpid/agent) uses QMFv2 for data and method transfer o The APIs no longer use qpid::framing::* o Consequently, boost is no longer referenced from the API headers. o Agents and Objects are now referenced by strings, not numbers. o Schema transfer still uses the QMFv1 format. - The broker-resident agent can use QMFv1 or QMFv2 based on the command line options. It defaults to QMFv1 for compatibility. - The pure-python QMF console (qmf.console) can concurrently interact with both QMFv1 and QMFv2 agents. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@929716 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/management/ManagementTopicExchange.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'cpp/src/qpid/management/ManagementTopicExchange.cpp') diff --git a/cpp/src/qpid/management/ManagementTopicExchange.cpp b/cpp/src/qpid/management/ManagementTopicExchange.cpp index 98650b3adf..7fdce133e5 100644 --- a/cpp/src/qpid/management/ManagementTopicExchange.cpp +++ b/cpp/src/qpid/management/ManagementTopicExchange.cpp @@ -28,13 +28,16 @@ using namespace qpid::framing; using namespace qpid::sys; ManagementTopicExchange::ManagementTopicExchange(const string& _name, Manageable* _parent, Broker* b) : - Exchange (_name, _parent, b), TopicExchange(_name, _parent, b) {} + Exchange (_name, _parent, b), + TopicExchange(_name, _parent, b), + managementAgent(0) {} ManagementTopicExchange::ManagementTopicExchange(const std::string& _name, bool _durable, const FieldTable& _args, Manageable* _parent, Broker* b) : Exchange (_name, _durable, _args, _parent, b), - TopicExchange(_name, _durable, _args, _parent, b) {} + TopicExchange(_name, _durable, _args, _parent, b), + managementAgent(0) {} void ManagementTopicExchange::route(Deliverable& msg, const string& routingKey, @@ -43,12 +46,8 @@ void ManagementTopicExchange::route(Deliverable& msg, bool routeIt = true; // Intercept management agent commands - if (qmfVersion == 1) { - if ((routingKey.length() > 6 && - routingKey.substr(0, 6).compare("agent.") == 0) || - (routingKey == "broker")) - routeIt = managementAgent->dispatchCommand(msg, routingKey, args); - } + if (managementAgent) + routeIt = managementAgent->dispatchCommand(msg, routingKey, args, true /* topic */); if (routeIt) TopicExchange::route(msg, routingKey, args); -- cgit v1.2.1