From 6aeb03f0f5ac7ede957995fc784367a30920c683 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 18 Sep 2007 19:43:29 +0000 Subject: Refactor HandlerImpl to use Session rather than CoreRefs. Remove most uses of ChannelAdapter in broker code. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@577027 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/SessionHandler.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'cpp/src/qpid/broker/SessionHandler.h') diff --git a/cpp/src/qpid/broker/SessionHandler.h b/cpp/src/qpid/broker/SessionHandler.h index c7c172b01d..219cd01396 100644 --- a/cpp/src/qpid/broker/SessionHandler.h +++ b/cpp/src/qpid/broker/SessionHandler.h @@ -24,14 +24,10 @@ #include "qpid/framing/FrameHandler.h" #include "qpid/framing/AMQP_ServerOperations.h" +#include "qpid/framing/AMQP_ClientProxy.h" #include "qpid/framing/amqp_types.h" namespace qpid { - -namespace framing { -class AMQP_ClientProxy; -} - namespace broker { class Connection; @@ -51,12 +47,17 @@ class SessionHandler : public framing::FrameHandler::InOutHandler ~SessionHandler(); /** Returns 0 if not attached to a session */ - Session* getSession() const { return session.get(); } + Session* getSession() { return session.get(); } + const Session* getSession() const { return session.get(); } framing::ChannelId getChannel() const { return channel; } + Connection& getConnection() { return connection; } const Connection& getConnection() const { return connection; } + framing::AMQP_ClientProxy& getProxy() { return proxy; } + const framing::AMQP_ClientProxy& getProxy() const { return proxy; } + protected: void handleIn(framing::AMQFrame&); void handleOut(framing::AMQFrame&); @@ -84,10 +85,9 @@ class SessionHandler : public framing::FrameHandler::InOutHandler void assertOpen(const char* method); void assertClosed(const char* method); - framing::AMQP_ClientProxy& getProxy(); - Connection& connection; const framing::ChannelId channel; + framing::AMQP_ClientProxy proxy; shared_ptr session; bool ignoring; ChannelMethods channelHandler; -- cgit v1.2.1