diff options
| author | Alan Conway <aconway@apache.org> | 2007-01-30 20:07:41 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-01-30 20:07:41 +0000 |
| commit | f9f848394de0662248cf62d4ec5e4818949403b2 (patch) | |
| tree | 4f13105e2223b704d7850300116dcc56116acae2 /cpp/lib/common | |
| parent | 98ccae7574a18f8d0a1f9e28e86ccfde4541c81f (diff) | |
| download | qpid-python-f9f848394de0662248cf62d4ec5e4818949403b2.tar.gz | |
Andrew Stitcher <astitcher@redhat.com>
r723@fuschia: andrew | 2007-01-12 00:35:16 +0000
Branch for my work on Qpid.0-9
r724@fuschia: andrew | 2007-01-12 00:59:28 +0000
Added in empty implementation of handler class for protocol Message class
r768@fuschia: andrew | 2007-01-17 01:25:16 +0000
* Added Test for new MessageHandlerImpl (but no actual tests yet)
* Filled in lots of the blanks in the MessageHandlerImpl with code
stolen from the BasicHandlerImpl
r800@fuschia: andrew | 2007-01-17 17:34:13 +0000
Updated to latest upstream changes
r840@fuschia: andrew | 2007-01-19 00:31:59 +0000
Fixed merge errors
r841@fuschia: andrew | 2007-01-19 00:47:29 +0000
Another merge problem fixed
r878@fuschia: andrew | 2007-01-24 11:27:48 +0000
Started work on the Message class handler implementation
r976@fuschia: andrew | 2007-01-30 17:05:05 +0000
Working again after broker Message refactor
r980@fuschia: andrew | 2007-01-30 18:39:18 +0000
Fix for extra parameter to transfer
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@501534 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/lib/common')
| -rw-r--r-- | cpp/lib/common/framing/ChannelAdapter.cpp | 6 | ||||
| -rw-r--r-- | cpp/lib/common/framing/ChannelAdapter.h | 2 | ||||
| -rw-r--r-- | cpp/lib/common/framing/MethodContext.h | 9 |
3 files changed, 12 insertions, 5 deletions
diff --git a/cpp/lib/common/framing/ChannelAdapter.cpp b/cpp/lib/common/framing/ChannelAdapter.cpp index 1fdb8d6691..653e47048e 100644 --- a/cpp/lib/common/framing/ChannelAdapter.cpp +++ b/cpp/lib/common/framing/ChannelAdapter.cpp @@ -29,7 +29,7 @@ void ChannelAdapter::init( id = i; out = &o; version = v; - context = MethodContext(id, this); + context = MethodContext(0, id, this); } void ChannelAdapter::send(AMQFrame* frame) { @@ -59,7 +59,7 @@ void ChannelAdapter::send(AMQBody::shared_ptr body) { void ChannelAdapter::handleRequest(AMQRequestBody::shared_ptr request) { assertMethodOk(*request); responder.received(request->getData()); - context =MethodContext(id, this, request->getRequestId()); + context =MethodContext(request.get(), id, this, request->getRequestId()); handleMethodInContext(request, context); } @@ -73,7 +73,7 @@ void ChannelAdapter::handleResponse(AMQResponseBody::shared_ptr response) { void ChannelAdapter::handleMethod(AMQMethodBody::shared_ptr method) { assertMethodOk(*method); - context = MethodContext(id, this); + context = MethodContext(method.get(), id, this); handleMethodInContext(method, context); } diff --git a/cpp/lib/common/framing/ChannelAdapter.h b/cpp/lib/common/framing/ChannelAdapter.h index b2a5ef6ff5..f0b3d2469a 100644 --- a/cpp/lib/common/framing/ChannelAdapter.h +++ b/cpp/lib/common/framing/ChannelAdapter.h @@ -54,7 +54,7 @@ class ChannelAdapter : public BodyHandler, public OutputHandler { /** *@param output Processed frames are forwarded to this handler. */ - ChannelAdapter() : context(0), id(0), out(0) {} + ChannelAdapter() : context(0, 0), id(0), out(0) {} /** Initialize the channel adapter. */ void init(ChannelId, OutputHandler&, const ProtocolVersion&); diff --git a/cpp/lib/common/framing/MethodContext.h b/cpp/lib/common/framing/MethodContext.h index 46d2e064b5..54e05f0fb2 100644 --- a/cpp/lib/common/framing/MethodContext.h +++ b/cpp/lib/common/framing/MethodContext.h @@ -26,6 +26,7 @@ namespace qpid { namespace framing { class BodyHandler; +class AMQMethodBody; /** * Invocation context for an AMQP method. @@ -46,8 +47,10 @@ struct MethodContext * will automatically construct the MethodContext. */ MethodContext( + const AMQMethodBody* method, ChannelId channel, OutputHandler* output=0, RequestId request=0) - : channelId(channel), out(output), requestId(request){} + : channelId(channel), out(output), requestId(request), + methodBody(method) {} /** \internal Channel on which the method is sent. */ ChannelId channelId; @@ -60,6 +63,10 @@ struct MethodContext */ RequestId requestId; + /** \internal This is the Method Body itself + * It's useful for passing around instead of unpacking all its parameters + */ + const AMQMethodBody* methodBody; }; }} // namespace qpid::framing |
