00001 #ifndef _client_Message_h
00002 #define _client_Message_h
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include <string>
00025 #include "qpid/client/Session.h"
00026 #include "qpid/framing/MessageTransferBody.h"
00027 #include "qpid/framing/TransferContent.h"
00028
00029 namespace qpid {
00030 namespace client {
00031
00037 class Message : public framing::TransferContent
00038 {
00039 public:
00045 Message(const std::string& data=std::string(),
00046 const std::string& routingKey=std::string(),
00047 const std::string& exchange=std::string());
00048
00054 std::string getDestination() const;
00055
00057 bool isRedelivered() const;
00059 void setRedelivered(bool redelivered);
00060
00062 framing::FieldTable& getHeaders();
00063
00065 const framing::FieldTable& getHeaders() const;
00066
00068 const framing::MessageTransferBody& getMethod() const;
00070 const framing::SequenceNumber& getId() const;
00071
00073 Message(const framing::FrameSet& frameset);
00074
00075 private:
00076
00077 framing::MessageTransferBody method;
00078 framing::SequenceNumber id;
00079 };
00080
00081 }}
00082
00083 #endif