summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/ConnectionHandler.h
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-06-08 15:31:31 +0000
committerAlan Conway <aconway@apache.org>2010-06-08 15:31:31 +0000
commit9c8302099de20be264d1bf357b6bceb963ada021 (patch)
treeabd4d1ede4af4dc9dcc6427b2b40c51441b51f5f /cpp/src/qpid/broker/ConnectionHandler.h
parentc116d46cc03b19304ce51e047ab31519098380fa (diff)
downloadqpid-python-9c8302099de20be264d1bf357b6bceb963ada021.tar.gz
Cluster handle connection-negotiation phase in local broker.
The connection negotiation phase up to the "open" or "open-ok" frame establishes whether/what encryption to use for the rest of the connection. With this patch a cluster broker completes the initial negotiation with its local clients and only then begins multicasting to other brokers. The local broker decrypts if necessary and multicasts in the clear. This replaces a problematic locking scheme that was formerly in place which caused deadlocks. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@952692 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/ConnectionHandler.h')
-rw-r--r--cpp/src/qpid/broker/ConnectionHandler.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/cpp/src/qpid/broker/ConnectionHandler.h b/cpp/src/qpid/broker/ConnectionHandler.h
index ecc8868e87..6d55cab647 100644
--- a/cpp/src/qpid/broker/ConnectionHandler.h
+++ b/cpp/src/qpid/broker/ConnectionHandler.h
@@ -40,9 +40,6 @@ namespace broker {
class Connection;
class SecureConnection;
-typedef boost::function<void ( std::string& )> UserIdCallback;
-
-
class ConnectionHandler : public framing::FrameHandler
{
struct Handler : public framing::AMQP_AllOperations::ConnectionHandler
@@ -53,6 +50,7 @@ class ConnectionHandler : public framing::FrameHandler
std::auto_ptr<SaslAuthenticator> authenticator;
AclModule* acl;
SecureConnection* secured;
+ bool isOpen;
Handler(Connection& connection, bool isClient, bool isShadow=false);
~Handler();
@@ -67,10 +65,6 @@ class ConnectionHandler : public framing::FrameHandler
void close(uint16_t replyCode, const std::string& replyText);
void closeOk();
- UserIdCallback userIdCallback;
- void setUserIdCallback ( UserIdCallback fn ) { userIdCallback = fn; };
-
-
void start(const qpid::framing::FieldTable& serverProperties,
const framing::Array& mechanisms,
const framing::Array& locales);
@@ -95,9 +89,7 @@ class ConnectionHandler : public framing::FrameHandler
void heartbeat();
void handle(framing::AMQFrame& frame);
void setSecureConnection(SecureConnection* secured);
- void setUserIdCallback ( UserIdCallback fn ) {
- handler->setUserIdCallback ( fn );
- }
+ bool isOpen() { return handler->isOpen; }
};