From 3b80f903b6174b4346d7d7b537d783f628fe28d6 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Fri, 21 Sep 2007 15:13:52 +0000 Subject: Moved c++ over to using the same preview file for 0-10 work as java. Removed all channel class related code from broker as a result. Did the same for some python tests I missed earlier. Renamed ChannelAdapter to ChannelHandler. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@578167 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/SessionHandler.cpp | 57 ++-------------------------------- 1 file changed, 3 insertions(+), 54 deletions(-) (limited to 'cpp/src/qpid/broker/SessionHandler.cpp') diff --git a/cpp/src/qpid/broker/SessionHandler.cpp b/cpp/src/qpid/broker/SessionHandler.cpp index e7ef6fdb87..01ce88059a 100644 --- a/cpp/src/qpid/broker/SessionHandler.cpp +++ b/cpp/src/qpid/broker/SessionHandler.cpp @@ -33,8 +33,7 @@ using namespace std; SessionHandler::SessionHandler(Connection& c, ChannelId ch) : InOutHandler(0, &c.getOutput()), connection(c), channel(ch), proxy(out), - ignoring(false), channelHandler(*this), - useChannelClose(false) {} + ignoring(false) {} SessionHandler::~SessionHandler() {} @@ -52,7 +51,7 @@ void SessionHandler::handleIn(AMQFrame& f) { // AMQMethodBody* m=f.getMethod(); try { - if (m && (m->invoke(this) || m->invoke(&channelHandler))) + if (m && m->invoke(this)) return; else if (session) session->in(f); @@ -62,12 +61,7 @@ void SessionHandler::handleIn(AMQFrame& f) { } catch(const ChannelException& e) { ignoring=true; // Ignore trailing frames sent by client. session.reset(); - // FIXME aconway 2007-09-19: Dual-mode hack. - if (useChannelClose) - getProxy().getChannel().close( - e.code, e.toString(), classId(m), methodId(m)); - else - getProxy().getSession().closed(e.code, e.toString()); + getProxy().getSession().closed(e.code, e.toString()); }catch(const ConnectionException& e){ connection.close(e.code, e.what(), classId(m), methodId(m)); }catch(const std::exception& e){ @@ -98,51 +92,6 @@ void SessionHandler::assertClosed(const char* method) { << getChannel())); } -void SessionHandler::ChannelMethods::open(const string& /*outOfBand*/){ - parent.useChannelClose=true; - parent.assertClosed("open"); - parent.session.reset(new Session(parent, 0)); - parent.getProxy().getChannel().openOk(); -} - -// FIXME aconway 2007-08-31: flow is no longer in the spec. -void SessionHandler::ChannelMethods::flow(bool active){ - parent.session->flow(active); - parent.getProxy().getChannel().flowOk(active); -} - -void SessionHandler::ChannelMethods::flowOk(bool /*active*/){} - -void SessionHandler::ChannelMethods::close(uint16_t replyCode, - const string& replyText, - uint16_t classId, uint16_t methodId) -{ - // FIXME aconway 2007-08-31: Extend constants.h to map codes & ids - // to text names. - QPID_LOG(warning, "Received channel.close("<