summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/ClusterHandler.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-09-25 12:30:14 +0000
committerAlan Conway <aconway@apache.org>2008-09-25 12:30:14 +0000
commit48f511ecb4a772f2cf6048f9b5ddbf9a4e3f9587 (patch)
tree7b75738562cf97befd775868670c336995ba0cd1 /cpp/src/qpid/cluster/ClusterHandler.cpp
parentcd78f5c69d70b43e5bf82fa9125eb876bc3bbc42 (diff)
downloadqpid-python-48f511ecb4a772f2cf6048f9b5ddbf9a4e3f9587.tar.gz
Enabled management, add cluster shutdown command.
Remove dead Handler methods in Cluster. Fixed SessionException handling in broker, was throwing some SessionExceptions as "unknown exception" git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@698945 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/ClusterHandler.cpp')
-rw-r--r--cpp/src/qpid/cluster/ClusterHandler.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/cpp/src/qpid/cluster/ClusterHandler.cpp b/cpp/src/qpid/cluster/ClusterHandler.cpp
index 648d40470c..7413f27192 100644
--- a/cpp/src/qpid/cluster/ClusterHandler.cpp
+++ b/cpp/src/qpid/cluster/ClusterHandler.cpp
@@ -19,11 +19,13 @@
*
*/
-#include "qpid/framing/AllInvoker.h"
-
+#include "Cluster.h"
#include "ClusterHandler.h"
+
#include "qpid/framing/AMQFrame.h"
+#include "qpid/framing/AllInvoker.h"
#include "qpid/framing/FieldTable.h"
+#include "qpid/log/Statement.h"
@@ -38,6 +40,7 @@ struct Operations : public framing::AMQP_AllOperations::ClusterHandler {
void update(const framing::FieldTable& members, uint64_t dumping) { handler.update(member, members, dumping); }
void dumpRequest(const std::string& url) { handler.dumpRequest(member, url); }
void ready(const std::string& url) { handler.ready(member, url); }
+ void shutdown() { handler.shutdown(member); }
};
ClusterHandler::~ClusterHandler() {}
@@ -49,5 +52,11 @@ bool ClusterHandler::invoke(const MemberId& id, framing::AMQFrame& frame) {
return framing::invoke(ops, *frame.getBody()).wasHandled();
}
+void ClusterHandler::shutdown(const MemberId& id) {
+ QPID_LOG(notice, cluster.self << " received shutdown from " << id);
+ cluster.leave();
+}
+
+
}} // namespace qpid::cluster