Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Message.h
Go to the documentation of this file.
1 #ifndef QPID_CLIENT_MESSAGE_H
2 #define QPID_CLIENT_MESSAGE_H
3 
4 /*
5  *
6  * Licensed to the Apache Software Foundation (ASF) under one
7  * or more contributor license agreements. See the NOTICE file
8  * distributed with this work for additional information
9  * regarding copyright ownership. The ASF licenses this file
10  * to you under the Apache License, Version 2.0 (the
11  * "License"); you may not use this file except in compliance
12  * with the License. You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing,
17  * software distributed under the License is distributed on an
18  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19  * KIND, either express or implied. See the License for the
20  * specific language governing permissions and limitations
21  * under the License.
22  *
23  */
24 
28 #include <string>
29 
30 namespace qpid {
31 
32 namespace framing {
33 class FieldTable;
34 class SequenceNumber; // FIXME aconway 2009-04-17: remove with getID?
35 }
36 
37 namespace client {
38 
39 class MessageImpl;
40 
116 {
117 public:
123  const std::string& data=std::string(),
124  const std::string& routingKey=std::string());
125  Message(MessageImpl*);
126  QPID_CLIENT_EXTERN Message(const Message&);
127  QPID_CLIENT_EXTERN ~Message();
128  QPID_CLIENT_EXTERN Message& operator=(const Message&);
129  QPID_CLIENT_EXTERN void swap(Message&);
130 
131  QPID_CLIENT_EXTERN void setData(const std::string&);
132  QPID_CLIENT_EXTERN const std::string& getData() const;
133  QPID_CLIENT_EXTERN std::string& getData();
134 
135  QPID_CLIENT_EXTERN void appendData(const std::string&);
136 
137  QPID_CLIENT_EXTERN bool hasMessageProperties() const;
138  QPID_CLIENT_EXTERN framing::MessageProperties& getMessageProperties();
139  QPID_CLIENT_EXTERN const framing::MessageProperties& getMessageProperties() const;
140 
141  QPID_CLIENT_EXTERN bool hasDeliveryProperties() const;
142  QPID_CLIENT_EXTERN framing::DeliveryProperties& getDeliveryProperties();
143  QPID_CLIENT_EXTERN const framing::DeliveryProperties& getDeliveryProperties() const;
144 
145 
151  QPID_CLIENT_EXTERN std::string getDestination() const;
152 
154  QPID_CLIENT_EXTERN bool isRedelivered() const;
156  QPID_CLIENT_EXTERN void setRedelivered(bool redelivered);
157 
160 
162  QPID_CLIENT_EXTERN const framing::FieldTable& getHeaders() const;
163 
164  // FIXME aconway 2009-04-17: does this need to be in public API?
166  QPID_CLIENT_EXTERN const framing::SequenceNumber& getId() const;
167 
168  private:
169  MessageImpl* impl;
170  friend class MessageImpl; // Helper template for implementation
171 };
172 
173 }}
174 
175 #endif

Qpid C++ API Reference
Generated on Thu Nov 15 2012 for Qpid C++ Client API by doxygen 1.8.1.2