diff options
| author | Alan Conway <aconway@apache.org> | 2007-06-27 21:19:14 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-06-27 21:19:14 +0000 |
| commit | 0efcf2c5c91f4927ccc00ad1cf391c2f964cc2e1 (patch) | |
| tree | a9318ac4787cf588dd1329c2e557d8f870be20cc /cpp/src/qpid/broker | |
| parent | 548abd065f91bc1f238ac98c24edf410edf10356 (diff) | |
| download | qpid-python-0efcf2c5c91f4927ccc00ad1cf391c2f964cc2e1.tar.gz | |
* src/qpid/framing/ChannelAdapter.cpp: Use handler chains
for in and outbound frames.
* src/qpid/framing/InputHandler.h, OutputHandler.h, FrameHandler.h:
All handlers pass AMQFrame& and have consistent memory management.
Terminal OutputHandlers used to take ownership and delete frame, now
they make a shallow copy instead.
* src/qpid/framing/Handler.h, FrameHandler.h: Simplified.
* src/qpid/client/ClientConnection.cpp:
* src/qpid/broker/Connection.cpp:
* src/qpid/broker/BrokerChannel.cpp:
Update for ChannelAdapter changes.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@551336 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker')
| -rw-r--r-- | cpp/src/qpid/broker/BrokerChannel.cpp | 3 | ||||
| -rw-r--r-- | cpp/src/qpid/broker/Connection.cpp | 4 | ||||
| -rw-r--r-- | cpp/src/qpid/broker/Connection.h | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/cpp/src/qpid/broker/BrokerChannel.cpp b/cpp/src/qpid/broker/BrokerChannel.cpp index c1f0b44ed4..26e590f87e 100644 --- a/cpp/src/qpid/broker/BrokerChannel.cpp +++ b/cpp/src/qpid/broker/BrokerChannel.cpp @@ -55,7 +55,7 @@ Channel::Channel( uint32_t _framesize, MessageStore* const _store, uint64_t _stagingThreshold ) : - ChannelAdapter(id, &con.getOutput(), con.getVersion()), + ChannelAdapter(), connection(con), currentDeliveryTag(1), prefetchSize(0), @@ -70,6 +70,7 @@ Channel::Channel( flowActive(true), adapter(new BrokerAdapter(*this, con, con.broker)) { + init(id, con.getOutput(), con.getVersion()); outstanding.reset(); } diff --git a/cpp/src/qpid/broker/Connection.cpp b/cpp/src/qpid/broker/Connection.cpp index d809ef14d9..2bd835e753 100644 --- a/cpp/src/qpid/broker/Connection.cpp +++ b/cpp/src/qpid/broker/Connection.cpp @@ -66,8 +66,8 @@ Exchange::shared_ptr Connection::findExchange(const string& name){ } -void Connection::received(framing::AMQFrame* frame){ - getChannel(frame->getChannel()).handleBody(frame->getBody()); +void Connection::received(framing::AMQFrame& frame){ + getChannel((frame.getChannel())).getHandlers().in->handle(frame); } void Connection::close( diff --git a/cpp/src/qpid/broker/Connection.h b/cpp/src/qpid/broker/Connection.h index 3fc575280a..fcfc1d3334 100644 --- a/cpp/src/qpid/broker/Connection.h +++ b/cpp/src/qpid/broker/Connection.h @@ -80,7 +80,7 @@ class Connection : public sys::ConnectionInputHandler, std::vector<Queue::shared_ptr> exclusiveQueues; // ConnectionInputHandler methods - void received(framing::AMQFrame* frame); + void received(framing::AMQFrame& frame); void initiated(const framing::ProtocolInitiation& header); void idleOut(); void idleIn(); |
