summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/SemanticHandler.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-02-25 16:56:29 +0000
committerGordon Sim <gsim@apache.org>2008-02-25 16:56:29 +0000
commit773cc35a38cd34095f8800259ee7a2165a817053 (patch)
tree24c6b26d43ae2f95a7ad7be695bbe57ddbc4b641 /cpp/src/qpid/broker/SemanticHandler.cpp
parentf4e2d3de5df7bbaae41053191638734a991fd21c (diff)
downloadqpid-python-773cc35a38cd34095f8800259ee7a2165a817053.tar.gz
Some refactoring of the 0-10 codepath (being migrated to final spec) that primarily colocates the current session and execution layers to facilitate implementing the new session layer that will now encompass this behaviour.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@630934 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/SemanticHandler.cpp')
-rw-r--r--cpp/src/qpid/broker/SemanticHandler.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/cpp/src/qpid/broker/SemanticHandler.cpp b/cpp/src/qpid/broker/SemanticHandler.cpp
index 2a79496144..fdde7ec18c 100644
--- a/cpp/src/qpid/broker/SemanticHandler.cpp
+++ b/cpp/src/qpid/broker/SemanticHandler.cpp
@@ -22,7 +22,6 @@
#include "SemanticHandler.h"
#include "SemanticState.h"
#include "SessionContext.h"
-#include "SessionState.h"
#include "BrokerAdapter.h"
#include "MessageDelivery.h"
#include "qpid/framing/ExecutionCompleteBody.h"
@@ -37,9 +36,9 @@ using namespace qpid::broker;
using namespace qpid::framing;
using namespace qpid::sys;
-SemanticHandler::SemanticHandler(SessionState& s) :
+SemanticHandler::SemanticHandler(SessionContext& s) :
state(*this,s), session(s),
- msgBuilder(&s.getBroker().getStore(), s.getBroker().getStagingThreshold()),
+ msgBuilder(&s.getConnection().getBroker().getStore(), s.getConnection().getBroker().getStagingThreshold()),
ackOp(boost::bind(&SemanticState::ackRange, &state, _1, _2))
{}
@@ -164,13 +163,8 @@ void SemanticHandler::handleContent(AMQFrame& frame)
DeliveryId SemanticHandler::deliver(QueuedMessage& msg, DeliveryToken::shared_ptr token)
{
- SessionContext* handler = session.getHandler();
- if (handler) {
- uint32_t maxFrameSize = handler->getConnection().getFrameMax();
- MessageDelivery::deliver(msg, handler->out, ++outgoing.hwm, token, maxFrameSize);
- } else {
- QPID_LOG(error, "Dropping message as session is no longer attached to a channel.");
- }
+ uint32_t maxFrameSize = session.getConnection().getFrameMax();
+ MessageDelivery::deliver(msg, session.getProxy().getHandler(), ++outgoing.hwm, token, maxFrameSize);
return outgoing.hwm;
}