MigratoryData Client API for C++
Developer's Guide and Reference Manual
MigratoryDataMessage.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2007-2014 Migratory Data Systems (http://migratorydata.com)
3  * ALL RIGHTS RESERVED. Use is subject to license terms.
4  */
5 #ifndef _Message_h_included_
6 #define _Message_h_included_
7 
8 #include "MigratoryDataField.h"
9 #include <vector>
10 #include <string>
11 
17 namespace migratorydata
19 {
21 
26  {
27 
28  private :
29  std::string subject;
30  std::string content;
31  std::string closure;
32  std::vector<MigratoryDataField> fields;
33  std::string replyToSubject;
34 
35  protected:
36  bool snapshot;
37  bool recovery;
38  int seq;
39  int epoch;
40 
41  public :
42 
47 
54 
61  MigratoryDataMessage(const std::string& subject, const std::string& content);
62 
70  MigratoryDataMessage(const std::string& subject, const std::string& content, const std::string& closure);
71 
79  MigratoryDataMessage(const std::string& subject, const std::string& content, std::vector<MigratoryDataField>& fields);
80 
89  MigratoryDataMessage(const std::string& subject, const std::string& content, std::vector<MigratoryDataField>& fields, const std::string& closure);
90 
96  std::string getSubject() const;
97 
103  std::string getContent() const;
104 
110  std::vector<MigratoryDataField> getFields() const;
111 
117  std::string getClosure() const;
118 
124  bool isSnapshot() const;
125 
140  void setReplyTosubject(std::string& replyToSubject);
141 
151  std::string getReplyToSubject() const;
152 
156  virtual ~MigratoryDataMessage();
157 
159  bool isRecovery() const;
160 
161  int getSeq() const;
162 
163  int getEpoch() const;
165  };
166 }
167 
168 #endif // _Message_h_included_
Include the declaration of the MigratoryDataField class.
Represent a message.
Definition: MigratoryDataMessage.h:25