summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/BrokerChannel.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-07-09 10:07:26 +0000
committerGordon Sim <gsim@apache.org>2007-07-09 10:07:26 +0000
commitc4bf499790c30e0c98dd560c50c64c8a27fd9b89 (patch)
treec1f439bb86e32027c1aea5ec4e78f291737e8230 /cpp/src/qpid/broker/BrokerChannel.cpp
parent32fe78d370e0572a5ed21ff3e84f668d8a2f2a49 (diff)
downloadqpid-python-c4bf499790c30e0c98dd560c50c64c8a27fd9b89.tar.gz
refactoring:
* separated out the connection level method handling from semantic level (session/channel level should also be separated) * reduce coupling between Connection and Channel git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@554590 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/BrokerChannel.cpp')
-rw-r--r--cpp/src/qpid/broker/BrokerChannel.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/cpp/src/qpid/broker/BrokerChannel.cpp b/cpp/src/qpid/broker/BrokerChannel.cpp
index 3d9eab4433..c81e73aba1 100644
--- a/cpp/src/qpid/broker/BrokerChannel.cpp
+++ b/cpp/src/qpid/broker/BrokerChannel.cpp
@@ -50,22 +50,17 @@ using namespace qpid::framing;
using namespace qpid::sys;
-Channel::Channel(
- Connection& con, ChannelId id,
- uint32_t _framesize, MessageStore* const _store,
- uint64_t _stagingThreshold
-) :
+Channel::Channel(Connection& con, ChannelId id, MessageStore* const _store) :
ChannelAdapter(),
connection(con),
currentDeliveryTag(1),
prefetchSize(0),
prefetchCount(0),
- framesize(_framesize),
tagGenerator("sgen"),
dtxSelected(false),
accumulatedAck(0),
store(_store),
- messageBuilder(this, _store, _stagingThreshold),
+ messageBuilder(this, _store, connection.getStagingThreshold()),
opened(id == 0),//channel 0 is automatically open, other must be explicitly opened
flowActive(true),
adapter(new BrokerAdapter(*this, con, con.broker))
@@ -215,7 +210,7 @@ void Channel::deliver(
outstanding.count++;
}
//send deliver method, header and content(s)
- msg->deliver(*this, consumerTag, deliveryTag, framesize);
+ msg->deliver(*this, consumerTag, deliveryTag, connection.getFrameMax());
}
bool Channel::checkPrefetch(Message::shared_ptr& msg){
@@ -378,7 +373,7 @@ bool Channel::get(Queue::shared_ptr queue, const string& destination, bool ackEx
msg->sendGetOk(MethodContext(this, msg->getRespondTo()),
destination,
queue->getMessageCount() + 1, myDeliveryTag,
- framesize);
+ connection.getFrameMax());
if(ackExpected){
unacked.push_back(DeliveryRecord(msg, queue, myDeliveryTag));
}
@@ -391,7 +386,7 @@ bool Channel::get(Queue::shared_ptr queue, const string& destination, bool ackEx
void Channel::deliver(Message::shared_ptr& msg, const string& consumerTag,
uint64_t deliveryTag)
{
- msg->deliver(*this, consumerTag, deliveryTag, framesize);
+ msg->deliver(*this, consumerTag, deliveryTag, connection.getFrameMax());
}
void Channel::handleMethodInContext(