summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/HandlerImpl.h
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-09-21 18:26:37 +0000
committerAlan Conway <aconway@apache.org>2007-09-21 18:26:37 +0000
commit2f6d6ad7efd788b71204af67dff51b6233881e2e (patch)
treea3d123bc112d12dfcef341a312f418624c98e342 /cpp/src/qpid/broker/HandlerImpl.h
parent3b80f903b6174b4346d7d7b537d783f628fe28d6 (diff)
downloadqpid-python-2f6d6ad7efd788b71204af67dff51b6233881e2e.tar.gz
Split broker::Session into:
broker::SessionState: session info (uuid etc.) + handler chains. broker::SemanticState: session state for the SemanticHandler. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@578219 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/HandlerImpl.h')
-rw-r--r--cpp/src/qpid/broker/HandlerImpl.h29
1 files changed, 8 insertions, 21 deletions
diff --git a/cpp/src/qpid/broker/HandlerImpl.h b/cpp/src/qpid/broker/HandlerImpl.h
index c06188d3c0..0250805f52 100644
--- a/cpp/src/qpid/broker/HandlerImpl.h
+++ b/cpp/src/qpid/broker/HandlerImpl.h
@@ -19,9 +19,8 @@
*
*/
-#include "Session.h"
-#include "SessionHandler.h"
-#include "Connection.h"
+#include "SemanticState.h"
+#include "SessionState.h"
namespace qpid {
namespace broker {
@@ -34,26 +33,14 @@ class Broker;
*/
class HandlerImpl {
protected:
- HandlerImpl(Session& s) : session(s) {}
+ SemanticState& state;
+ SessionState& session;
- Session& getSession() { return session; }
- const Session& getSession() const { return session; }
-
- SessionHandler* getSessionHandler() { return session.getHandler(); }
- const SessionHandler* getSessionHandler() const { return session.getHandler(); }
+ HandlerImpl(SemanticState& s) : state(s), session(s.getSession()) {}
- // Remaining functions may only be called if getSessionHandler() != 0
- framing::AMQP_ClientProxy& getProxy() { return getSessionHandler()->getProxy(); }
- const framing::AMQP_ClientProxy& getProxy() const { return getSessionHandler()->getProxy(); }
-
- Connection& getConnection() { return getSessionHandler()->getConnection(); }
- const Connection& getConnection() const { return getSessionHandler()->getConnection(); }
-
- Broker& getBroker() { return getConnection().broker; }
- const Broker& getBroker() const { return getConnection().broker; }
-
- private:
- Session& session;
+ framing::AMQP_ClientProxy& getProxy() { return session.getProxy(); }
+ Connection& getConnection() { return session.getConnection(); }
+ Broker& getBroker() { return session.getBroker(); }
};
}} // namespace qpid::broker