Multistack launcher
[anna.git] / example / diameter / launcher / Node.hpp
1 // ANNA - Anna is Not Nothingness Anymore                                                         //
2 //                                                                                                //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo                         //
4 //                                                                                                //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite                           //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
7
8
9 #ifndef example_diameter_launcher_Node_hpp
10 #define example_diameter_launcher_Node_hpp
11
12 // Standard
13 #include <string>
14
15 // Process
16 #include "MyDiameterEntity.hpp"
17 #include "MyLocalServer.hpp"
18
19
20 class Node {
21
22   std::string a_name;
23   unsigned int a_applicationId;
24   std::string a_cer; // path file
25   std::string a_dwr; // path file
26   MyDiameterEntity *a_entity;
27   MyLocalServer *a_diameterServer;
28   bool a_balance; // Balance over entity servers instead of doing standard behaviour (first primary, secondary if fails, etc.). Default: false.
29   bool a_ignoreErrors; // default: false
30
31
32 public:
33   Node() { a_rotate = false; }
34   ~Node() { clear(); }
35
36
37   bool rotate() const throw() { return a_rotate; }
38   void rotate(bool r) throw() { a_rotate = r; }
39
40   void clear () throw();
41   void dump () throw();
42   void addMessage(int code, anna::diameter::codec::Message *message) throw();
43   anna::diameter::codec::Message* getMessage(int code) const throw();
44   void nextMessage(int code) throw();
45   std::string asString(const char *queueName) const throw();
46 };
47
48 #endif