00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <string>
00022 #include <framing/amqp_framing.h>
00023
00024 #ifndef _Message_
00025 #define _Message_
00026
00027
00028 namespace qpid {
00029 namespace client {
00030
00037 class Message{
00038 qpid::framing::AMQHeaderBody::shared_ptr header;
00039 std::string data;
00040 bool redelivered;
00041 u_int64_t deliveryTag;
00042
00043 qpid::framing::BasicHeaderProperties* getHeaderProperties();
00044 Message(qpid::framing::AMQHeaderBody::shared_ptr& header);
00045 public:
00046 Message();
00047 ~Message();
00048
00055 inline std::string getData(){ return data; }
00062 inline void setData(const std::string& _data){ data = _data; }
00063
00068 inline bool isRedelivered(){ return redelivered; }
00069 inline void setRedelivered(bool _redelivered){ redelivered = _redelivered; }
00070
00071 inline u_int64_t getDeliveryTag(){ return deliveryTag; }
00072
00073 const std::string& getContentType();
00074 const std::string& getContentEncoding();
00075 qpid::framing::FieldTable& getHeaders();
00076 u_int8_t getDeliveryMode();
00077 u_int8_t getPriority();
00078 const std::string& getCorrelationId();
00079 const std::string& getReplyTo();
00080 const std::string& getExpiration();
00081 const std::string& getMessageId();
00082 u_int64_t getTimestamp();
00083 const std::string& getType();
00084 const std::string& getUserId();
00085 const std::string& getAppId();
00086 const std::string& getClusterId();
00087
00088 void setContentType(const std::string& type);
00089 void setContentEncoding(const std::string& encoding);
00090 void setHeaders(const qpid::framing::FieldTable& headers);
00094 void setDeliveryMode(u_int8_t mode);
00095 void setPriority(u_int8_t priority);
00096 void setCorrelationId(const std::string& correlationId);
00097 void setReplyTo(const std::string& replyTo);
00098 void setExpiration(const std::string& expiration);
00099 void setMessageId(const std::string& messageId);
00100 void setTimestamp(u_int64_t timestamp);
00101 void setType(const std::string& type);
00102 void setUserId(const std::string& userId);
00103 void setAppId(const std::string& appId);
00104 void setClusterId(const std::string& clusterId);
00105
00106
00107 friend class Channel;
00108 };
00109
00110 }
00111 }
00112
00113
00114 #endif