Remove dynamic exceptions
[anna.git] / example / timex / ArithmeticHTTPServer / Application.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 timex_ArithmeticHTTPServer_Application_hpp
10 #define timex_ArithmeticHTTPServer_Application_hpp
11
12 #include <anna/comm/Application.hpp>
13 #include <anna/comm/Communicator.hpp>
14 #include <anna/comm/ReceiverFactoryImpl.hpp>
15
16 #include <anna/timex/Engine.hpp>
17
18 #include "Acceptor.hpp"
19 #include "Reactor.hpp"
20
21 namespace anna {
22    namespace comm {
23       class ServerSocket;
24       class IndexedDelivery;
25    }
26 }
27
28 namespace test {
29
30 namespace http4comm {
31
32 class Context;
33
34 using namespace anna;
35
36 class Application : public comm::Application {
37 public:
38    Application ();
39   
40    comm::IndexedDelivery* getService () { return a_service; }
41    http4comm::Context* getContext () { return a_context; }
42       
43 private:
44    comm::Communicator* a_communicator;
45    anna::timex::Engine a_timeController;
46    http4comm::Context* a_context;
47
48    comm::ReceiverFactoryImpl <Acceptor> a_acceptorFactory;
49    comm::ReceiverFactoryImpl <Reactor> a_reactorFactory;
50    comm::ServerSocket* a_serverSocket;
51    comm::IndexedDelivery* a_service;
52
53    void initialize () noexcept(false);
54    void run () noexcept(false);
55 };
56
57 }
58 }
59
60 #endif
61