summaryrefslogtreecommitdiff
path: root/cpp/lib/broker/BrokerMessageMessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/lib/broker/BrokerMessageMessage.cpp')
-rw-r--r--cpp/lib/broker/BrokerMessageMessage.cpp51
1 files changed, 33 insertions, 18 deletions
diff --git a/cpp/lib/broker/BrokerMessageMessage.cpp b/cpp/lib/broker/BrokerMessageMessage.cpp
index 4168ff639c..e2c4b94811 100644
--- a/cpp/lib/broker/BrokerMessageMessage.cpp
+++ b/cpp/lib/broker/BrokerMessageMessage.cpp
@@ -18,25 +18,39 @@
* under the License.
*
*/
+#include <iostream>
#include "BrokerMessageMessage.h"
+#include "MessageTransferBody.h"
+#include "MessageAppendBody.h"
+#include "Reference.h"
+using namespace std;
using namespace qpid::broker;
-MessageMessage::MessageMessage(
- const qpid::framing::AMQMethodBody::shared_ptr _methodBody,
- const std::string& _exchange, const std::string& _routingKey,
- bool _mandatory, bool _immediate) :
- Message(_exchange, _routingKey, _mandatory, _immediate, _methodBody),
- methodBody(_methodBody)
-{
-}
+MessageMessage::MessageMessage(TransferPtr transfer_)
+ : Message(transfer_->getExchange(), transfer_->getRoutingKey(),
+ transfer_->getMandatory(), transfer_->getImmediate(),
+ transfer_),
+ transfer(transfer_)
+{}
+
+MessageMessage::MessageMessage(TransferPtr transfer_, const Reference& ref)
+ : Message(transfer_->getExchange(), transfer_->getRoutingKey(),
+ transfer_->getMandatory(), transfer_->getImmediate(),
+ transfer_),
+ transfer(transfer_),
+ appends(ref.getAppends())
+{}
void MessageMessage::deliver(
- framing::ChannelAdapter& /*out*/,
+ framing::ChannelAdapter& /*channel*/,
const std::string& /*consumerTag*/,
u_int64_t /*deliveryTag*/,
u_int32_t /*framesize*/)
{
+ // FIXME aconway 2007-02-05:
+ cout << "MessageMessage::deliver" << *transfer << " + " << appends.size()
+ << " appends." << endl;
}
void MessageMessage::sendGetOk(
@@ -45,49 +59,50 @@ void MessageMessage::sendGetOk(
u_int64_t /*deliveryTag*/,
u_int32_t /*framesize*/)
{
+ // FIXME aconway 2007-02-05:
}
bool MessageMessage::isComplete()
{
- return true;
+ return true; // FIXME aconway 2007-02-05:
}
u_int64_t MessageMessage::contentSize() const
{
- return 0;
+ return 0; // FIXME aconway 2007-02-05:
}
qpid::framing::BasicHeaderProperties* MessageMessage::getHeaderProperties()
{
- return 0;
+ return 0; // FIXME aconway 2007-02-05:
}
bool MessageMessage::isPersistent()
{
- return false;
+ return false; // FIXME aconway 2007-02-05:
}
const ConnectionToken* const MessageMessage::getPublisher()
{
- return 0;
+ return 0; // FIXME aconway 2007-02-05:
}
u_int32_t MessageMessage::encodedSize()
{
- return 0;
+ return 0; // FIXME aconway 2007-02-05:
}
u_int32_t MessageMessage::encodedHeaderSize()
{
- return 0;
+ return 0; // FIXME aconway 2007-02-05:
}
u_int32_t MessageMessage::encodedContentSize()
{
- return 0;
+ return 0; // FIXME aconway 2007-02-05:
}
u_int64_t MessageMessage::expectedContentSize()
{
- return 0;
+ return 0; // FIXME aconway 2007-02-05:
}