From e861284318186f8d9cd64a7ddcc28b8d20b98721 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Fri, 19 Jan 2007 21:33:27 +0000 Subject: Last big refactoring for 0-9 framing. Still need additional tests & debugging but the overall structure is all in place. * configure.ac: Added -Wno_virtual_overload warning * ChannelTest.cpp, MessageBuilderTest.cpp: Fixed virtual overload warnings. * ChannelAdapter.cpp: Common base for client/broker adapters. Creates invocation context, handles request/resposne IDs. * CppGenerator.java: - Proxies send methods using MethodContext. * Various .h files: removed unnecessary #includes, added to requred .cpp files. * ConnectionContext: renamed from SessionContext. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@497963 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/lib/broker/MessageHandlerImpl.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'cpp/lib/broker/MessageHandlerImpl.cpp') diff --git a/cpp/lib/broker/MessageHandlerImpl.cpp b/cpp/lib/broker/MessageHandlerImpl.cpp index 07ede4097a..33f7a63d45 100644 --- a/cpp/lib/broker/MessageHandlerImpl.cpp +++ b/cpp/lib/broker/MessageHandlerImpl.cpp @@ -64,7 +64,7 @@ MessageHandlerImpl::close(const MethodContext&, } void -MessageHandlerImpl::consume(const MethodContext&, +MessageHandlerImpl::consume(const MethodContext& context, u_int16_t /*ticket*/, const string& queueName, const string& destination, @@ -85,7 +85,7 @@ MessageHandlerImpl::consume(const MethodContext&, string newTag = destination; channel.consume(newTag, queue, !noAck, exclusive, noLocal ? &connection : 0, &filter); - connection.client->getMessageHandler()->ok(channel.getId()); + connection.client->getMessageHandler()->ok(context); //allow messages to be dispatched if required as there is now a consumer: queue->dispatch(); @@ -102,7 +102,7 @@ MessageHandlerImpl::empty( const MethodContext& ) } void -MessageHandlerImpl::get( const MethodContext&, +MessageHandlerImpl::get( const MethodContext& context, u_int16_t /*ticket*/, const string& queueName, const string& /*destination*/, @@ -110,12 +110,12 @@ MessageHandlerImpl::get( const MethodContext&, { assert(0); // FIXME astitcher 2007-01-11: 0-9 feature - Queue::shared_ptr queue = connection.getQueue(queueName, channel.getId()); + Queue::shared_ptr queue = + connection.getQueue(queueName, context.channelId); // FIXME: get is probably Basic specific - if(!connection.getChannel(channel.getId()).get(queue, !noAck)){ - - connection.client->getMessageHandler()->empty(channel.getId()); + if(!channel.get(queue, !noAck)){ + connection.client->getMessageHandler()->empty(context); } } @@ -141,7 +141,7 @@ MessageHandlerImpl::open(const MethodContext&, } void -MessageHandlerImpl::qos(const MethodContext&, +MessageHandlerImpl::qos(const MethodContext& context, u_int32_t prefetchSize, u_int16_t prefetchCount, bool /*global*/ ) @@ -152,7 +152,7 @@ MessageHandlerImpl::qos(const MethodContext&, channel.setPrefetchSize(prefetchSize); channel.setPrefetchCount(prefetchCount); - connection.client->getMessageHandler()->ok(channel.getId()); + connection.client->getMessageHandler()->ok(context); } void -- cgit v1.2.1