diff options
author | Gordon Sim <gsim@apache.org> | 2008-04-20 12:10:37 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2008-04-20 12:10:37 +0000 |
commit | 0637677cf6653256b67c82dcb74f35133601220c (patch) | |
tree | 8507bb8373e8b6dfd8c9b96fcb4b262fd4d61501 /cpp/src/qpid/client/Message.h | |
parent | 48dab065ef526f68a5a7d4c4ba22c5b8b2e2e026 (diff) | |
download | qpid-python-0637677cf6653256b67c82dcb74f35133601220c.tar.gz |
QPID-920: converted c++ client to use final 0-10 protocol
* connection handler converted to using invoker & proxy and updated to final method defs
* SessionCore & ExecutionHandler replace by SessionImpl
* simplified handling of completion & results, removed handling of responses
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@649915 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/Message.h')
-rw-r--r-- | cpp/src/qpid/client/Message.h | 63 |
1 files changed, 12 insertions, 51 deletions
diff --git a/cpp/src/qpid/client/Message.h b/cpp/src/qpid/client/Message.h index daac30ba36..977cc89146 100644 --- a/cpp/src/qpid/client/Message.h +++ b/cpp/src/qpid/client/Message.h @@ -30,7 +30,7 @@ namespace qpid { namespace client { /** - * A representation of messages for sent or recived through the + * A representation of messages for sent or received through the * client api. * * \ingroup clientapi @@ -38,60 +38,21 @@ namespace client { class Message : public framing::TransferContent { public: - Message(const std::string& data_=std::string(), + Message(const std::string& data=std::string(), const std::string& routingKey=std::string(), - const std::string& exchange=std::string() - ) : TransferContent(data_, routingKey, exchange) {} - - std::string getDestination() const - { - return method.getDestination(); - } - - bool isRedelivered() const - { - return hasDeliveryProperties() && getDeliveryProperties().getRedelivered(); - } - - void setRedelivered(bool redelivered) - { - getDeliveryProperties().setRedelivered(redelivered); - } - - framing::FieldTable& getHeaders() - { - return getMessageProperties().getApplicationHeaders(); - } - - void acknowledge(Session& session, bool cumulative = true, bool send = true) const - { - session.getExecution().completed(id, cumulative, send); - } - - void acknowledge(bool cumulative = true, bool send = true) const - { - const_cast<Session&>(session).getExecution().completed(id, cumulative, send); - } + const std::string& exchange=std::string()); + std::string getDestination() const; + bool isRedelivered() const; + void setRedelivered(bool redelivered); + framing::FieldTable& getHeaders(); + void acknowledge(bool cumulative = true, bool notifyPeer = true) const; + const framing::MessageTransferBody& getMethod() const; + const framing::SequenceNumber& getId() const; /**@internal for incoming messages */ - Message(const framing::FrameSet& frameset, Session s) : - method(*frameset.as<framing::MessageTransferBody>()), id(frameset.getId()), session(s) - { - populate(frameset); - } - - const framing::MessageTransferBody& getMethod() const - { - return method; - } - - const framing::SequenceNumber& getId() const - { - return id; - } - + Message(const framing::FrameSet& frameset, Session s); /**@internal use for incoming messages. */ - void setSession(Session s) { session=s; } + void setSession(Session s); private: //method and id are only set for received messages: framing::MessageTransferBody method; |