summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/XmlExchange.cpp
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2008-07-08 21:54:20 +0000
committerTed Ross <tross@apache.org>2008-07-08 21:54:20 +0000
commit391608a73f18a1797ab0c358f0a94364dc888eb2 (patch)
treec7f26ec2072884a2e94a767a3d4f29d76c4e81c7 /cpp/src/qpid/broker/XmlExchange.cpp
parent5515803c70dfeff04c190533e7f0187a0e732bf4 (diff)
downloadqpid-python-391608a73f18a1797ab0c358f0a94364dc888eb2.tar.gz
QPID-1170 - Remove boost dependency from management agent interface
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@674994 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/XmlExchange.cpp')
-rw-r--r--cpp/src/qpid/broker/XmlExchange.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/cpp/src/qpid/broker/XmlExchange.cpp b/cpp/src/qpid/broker/XmlExchange.cpp
index 8c4d4f79a4..cb0f9a9606 100644
--- a/cpp/src/qpid/broker/XmlExchange.cpp
+++ b/cpp/src/qpid/broker/XmlExchange.cpp
@@ -46,7 +46,7 @@ namespace broker {
XmlExchange::XmlExchange(const string& _name, Manageable* _parent) : Exchange(_name, _parent)
{
- if (mgmtExchange.get() != 0)
+ if (mgmtExchange != 0)
mgmtExchange->set_type (typeName);
}
@@ -54,7 +54,7 @@ XmlExchange::XmlExchange(const std::string& _name, bool _durable,
const FieldTable& _args, Manageable* _parent) :
Exchange(_name, _durable, _args, _parent)
{
- if (mgmtExchange.get() != 0)
+ if (mgmtExchange != 0)
mgmtExchange->set_type (typeName);
}
@@ -96,8 +96,9 @@ bool XmlExchange::bind(Queue::shared_ptr queue, const string& routingKey, const
bindingsMap[routingKey] = bindings;
QPID_LOG(trace, "Bound successfully with query: " << queryText );
- if (mgmtExchange.get() != 0) {
+ if (mgmtExchange != 0) {
mgmtExchange->inc_bindingCount();
+ ((management::Queue*) queue->GetManagementObject())->inc_bindingCount();
}
return true;
} else{
@@ -127,8 +128,9 @@ bool XmlExchange::unbind(Queue::shared_ptr queue, const string& routingKey, cons
if (bindings.empty()) {
bindingsMap.erase(routingKey);
}
- if (mgmtExchange.get() != 0) {
+ if (mgmtExchange != 0) {
mgmtExchange->dec_bindingCount();
+ ((management::Queue*) queue->GetManagementObject())->dec_bindingCount();
}
return true;
} else {
@@ -203,25 +205,25 @@ void XmlExchange::route(Deliverable& msg, const string& routingKey, const FieldT
count++;
QPID_LOG(trace, "Delivered to queue" );
- if ((*i)->mgmtBinding.get() != 0)
+ if ((*i)->mgmtBinding != 0)
(*i)->mgmtBinding->inc_msgMatched ();
}
if(!count){
QPID_LOG(warning, "XMLExchange " << getName() << ": could not route message with query " << routingKey);
- if (mgmtExchange.get() != 0) {
+ if (mgmtExchange != 0) {
mgmtExchange->inc_msgDrops ();
mgmtExchange->inc_byteDrops (msg.contentSize ());
}
}
else {
- if (mgmtExchange.get() != 0) {
+ if (mgmtExchange != 0) {
mgmtExchange->inc_msgRoutes (count);
mgmtExchange->inc_byteRoutes (count * msg.contentSize ());
}
}
- if (mgmtExchange.get() != 0) {
+ if (mgmtExchange != 0) {
mgmtExchange->inc_msgReceives ();
mgmtExchange->inc_byteReceives (msg.contentSize ());
}