summaryrefslogtreecommitdiff
path: root/cpp/broker/inc/Message.h
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2006-10-06 16:17:06 +0000
committerGordon Sim <gsim@apache.org>2006-10-06 16:17:06 +0000
commit14654e5360b72adf1704838b3820c7d1fc860e8e (patch)
tree0342b1cedd2262809edb951fc234bc75deb20533 /cpp/broker/inc/Message.h
parent55ad18a1c847c1b14d48c56ce7ee253aadf86ef7 (diff)
downloadqpid-python-14654e5360b72adf1704838b3820c7d1fc860e8e.tar.gz
Decoupled routing from the channel and message classes.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@453657 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/broker/inc/Message.h')
-rw-r--r--cpp/broker/inc/Message.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/cpp/broker/inc/Message.h b/cpp/broker/inc/Message.h
index 7a239adace..8b3321c2dc 100644
--- a/cpp/broker/inc/Message.h
+++ b/cpp/broker/inc/Message.h
@@ -29,14 +29,19 @@
namespace qpid {
namespace broker {
class ExchangeRegistry;
-
+
+ /**
+ * Represents an AMQP message, i.e. a header body, a list of
+ * content bodies and some details about the publication
+ * request.
+ */
class Message{
typedef std::vector<qpid::framing::AMQContentBody::shared_ptr> content_list;
typedef content_list::iterator content_iterator;
const ConnectionToken* const publisher;
- string exchange;
- string routingKey;
+ const string exchange;
+ const string routingKey;
const bool mandatory;
const bool immediate;
bool redelivered;
@@ -44,8 +49,6 @@ namespace qpid {
content_list content;
u_int64_t contentSize();
- qpid::framing::BasicHeaderProperties* getHeaderProperties();
-
public:
typedef std::tr1::shared_ptr<Message> shared_ptr;
@@ -64,10 +67,10 @@ namespace qpid {
u_int32_t framesize);
void redeliver();
- friend bool route(Message::shared_ptr& msg, ExchangeRegistry* registry);
-
+ qpid::framing::BasicHeaderProperties* getHeaderProperties();
+ const string& getRoutingKey() const { return routingKey; }
+ const string& getExchange() const { return exchange; }
};
- bool route(Message::shared_ptr& msg, ExchangeRegistry* registry);
}
}