diff options
author | Alan Conway <aconway@apache.org> | 2008-09-18 13:55:30 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-09-18 13:55:30 +0000 |
commit | e2b079386b19c34a26bb4a7c67bd002ebb9bdc94 (patch) | |
tree | c190fa29f5a58530bba7f174ec6f5727c36630ba /cpp/src/qpid/cluster/Connection.cpp | |
parent | fcc3335293a77c8e9130ea1836ee55872d6b28f5 (diff) | |
download | qpid-python-e2b079386b19c34a26bb4a7c67bd002ebb9bdc94.tar.gz |
Refactor Cluster logic into separate handlers for Joining & Member modes.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@696657 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Connection.cpp')
-rw-r--r-- | cpp/src/qpid/cluster/Connection.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/cpp/src/qpid/cluster/Connection.cpp b/cpp/src/qpid/cluster/Connection.cpp index 6cc21633d3..51da5bef25 100644 --- a/cpp/src/qpid/cluster/Connection.cpp +++ b/cpp/src/qpid/cluster/Connection.cpp @@ -21,11 +21,9 @@ #include "Connection.h" #include "Cluster.h" #include "qpid/framing/AMQFrame.h" -#include "qpid/framing/Invoker.h" -#include "qpid/framing/AllInvoker.h" #include "qpid/framing/ClusterConnectionDeliverCloseBody.h" #include "qpid/log/Statement.h" - +#include "qpid/framing/AllInvoker.h" #include <boost/current_function.hpp> namespace qpid { @@ -47,11 +45,6 @@ Connection::Connection(Cluster& c, sys::ConnectionOutputHandler& out, Connection::~Connection() {} -void Connection::received(framing::AMQFrame& ) { - // FIXME aconway 2008-09-02: not called, codec sends straight to deliver - assert(0); -} - bool Connection::doOutput() { return output.doOutput(); } // Delivery of doOutput allows us to run the real connection doOutput() @@ -62,7 +55,7 @@ void Connection::deliverDoOutput(uint32_t requested) { } // Handle frames delivered from cluster. -void Connection::deliver(framing::AMQFrame& f) { +void Connection::received(framing::AMQFrame& f) { QPID_LOG(trace, "DLVR [" << self << "]: " << f); // Handle connection controls, deliver other frames to connection. if (!framing::invoke(*this, *f.getBody()).wasHandled()) @@ -95,14 +88,13 @@ void Connection::deliverClose () { size_t Connection::decode(const char* buffer, size_t size) { ++mcastSeq; cluster.mcastBuffer(buffer, size, self); - // FIXME aconway 2008-09-01: deserialize? return size; } void Connection::deliverBuffer(Buffer& buf) { ++deliverSeq; while (decoder.decode(buf)) - deliver(decoder.frame); // FIXME aconway 2008-09-01: Queue frames for delivery in separate thread. + received(decoder.frame); } |