ADML is not really an AOTS deployment but an simple ADML one
[anna.git] / example / diameter / rxSimpleTest / rxSimpleTest.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_rxSimpleTest_hpp
10 #define example_diameter_rxSimpleTest_hpp
11
12 // Standard
13 #include <fstream>
14 #include <string>
15 #include <map>
16
17 // Project
18 #include <anna/core/core.hpp>
19 #include <anna/comm/comm.hpp>
20 #include <anna/time/Date.hpp>
21 #include <anna/diameter/codec/Message.hpp>
22
23 // Process
24 #include <MyCommunicator.hpp>
25
26
27 namespace anna {
28   namespace timex {
29     class Engine;
30   }
31   namespace diameter {
32     namespace codec {
33       class Engine;
34     }
35     namespace comm {
36       class OriginHost;
37     }
38   }
39 }
40
41 class MyDiameterEntity;
42 class MyLocalServer;
43 class MyDiameterEngine;
44
45 class RxSimpleTest : public anna::comm::Application {
46
47   // Start time:
48   anna::time::Date a_start_time;
49
50   // Core engines:
51   MyCommunicator *a_communicator;
52   anna::timex::Engine* a_timeEngine;
53   anna::Millisecond a_admlMinResolution;
54   anna::diameter::comm::OriginHost *a_workingNode;
55   std::string a_initialWorkingDirectory;
56
57
58   void initialize() throw(anna::RuntimeException); // HTTP
59   void run() throw(anna::RuntimeException);
60
61 public:
62   RxSimpleTest();
63
64   MyDiameterEntity *getEntity() const throw(anna::RuntimeException);
65   MyLocalServer *getServer() const throw(anna::RuntimeException);
66   MyDiameterEngine *getEngine() const throw(anna::RuntimeException);
67   MyCommunicator *getCommunicator() throw() { return a_communicator; }
68   void startService() throw(anna::RuntimeException);
69   anna::diameter::comm::OriginHost *getOriginHost(const std::string &name) const throw(anna::RuntimeException);
70
71   anna::xml::Node* asXML(anna::xml::Node* parent) const throw();
72 };
73
74 #endif