diff options
| author | Alan Conway <aconway@apache.org> | 2007-09-18 19:43:29 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-09-18 19:43:29 +0000 |
| commit | 6aeb03f0f5ac7ede957995fc784367a30920c683 (patch) | |
| tree | 7fe35f0ce9fe6bf17dbd6416deb6069ef9c7b07c /cpp/src/qpid/broker/Session.cpp | |
| parent | 8b039e1ed4e4340917d7fd3d8202049e691ca6ec (diff) | |
| download | qpid-python-6aeb03f0f5ac7ede957995fc784367a30920c683.tar.gz | |
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
Diffstat (limited to 'cpp/src/qpid/broker/Session.cpp')
| -rw-r--r-- | cpp/src/qpid/broker/Session.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/cpp/src/qpid/broker/Session.cpp b/cpp/src/qpid/broker/Session.cpp index 6bc96b0049..c59119140c 100644 --- a/cpp/src/qpid/broker/Session.cpp +++ b/cpp/src/qpid/broker/Session.cpp @@ -68,11 +68,9 @@ Session::Session(SessionHandler& a, uint32_t t) flowActive(true) { outstanding.reset(); - // FIXME aconway 2007-08-29: handler to get Session, not connection. std::auto_ptr<SemanticHandler> semantic(new SemanticHandler(*this)); + // FIXME aconway 2007-08-29: move deliveryAdapter to SemanticHandlerState. deliveryAdapter=semantic.get(); - // FIXME aconway 2007-08-31: Remove, workaround. - semanticHandler=semantic.get(); handlers.push_back(semantic.release()); in = &handlers[0]; out = &adapter->out; @@ -256,7 +254,7 @@ Session::ConsumerImpl::ConsumerImpl(Session* _parent, bool Session::ConsumerImpl::deliver(QueuedMessage& msg) { - if (nolocal && &parent->getAdapter()->getConnection() == msg.payload->getPublisher()) { + if (nolocal && &parent->getHandler()->getConnection() == msg.payload->getPublisher()) { return false; } else { if (!checkCredit(msg.payload) || !parent->flowActive || (ackExpected && !parent->checkPrefetch(msg.payload))) { @@ -306,7 +304,7 @@ void Session::ConsumerImpl::cancel() if(queue) { queue->cancel(this); if (queue->canAutoDelete()) { - parent->getAdapter()->getConnection().broker.getQueues().destroyIf(queue->getName(), + parent->getHandler()->getConnection().broker.getQueues().destroyIf(queue->getName(), boost::bind(boost::mem_fn(&Queue::canAutoDelete), queue)); } } @@ -333,7 +331,7 @@ void Session::handle(Message::shared_ptr msg) { void Session::route(Message::shared_ptr msg, Deliverable& strategy) { std::string exchangeName = msg->getExchangeName(); if (!cacheExchange || cacheExchange->getName() != exchangeName){ - cacheExchange = getAdapter()->getConnection().broker.getExchanges().get(exchangeName); + cacheExchange = getHandler()->getConnection().broker.getExchanges().get(exchangeName); } cacheExchange->route(strategy, msg->getRoutingKey(), msg->getApplicationHeaders()); |
