ANNA Suite  2020b
Multipurpose development suite for Telco applications
TimerManager.hpp
Go to the documentation of this file.
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 anna_diameter_comm_TimerManager_hpp
10 #define anna_diameter_comm_TimerManager_hpp
11 
12 #include <anna/config/defines.hpp>
14 #include <anna/core/Singleton.hpp>
17 
18 // Local
20 
21 
22 namespace anna {
23 class Millisecond;
24 
25 namespace timex {
26 class Engine;
27 }
28 }
29 
30 namespace anna {
31 
32 namespace diameter {
33 
34 namespace comm {
35 
36 
37 class Session;
38 class Response;
39 class LocalServer;
40 
41 
45 class TimerManager : public anna::timex::TimeEventObserver, public anna::Singleton <TimerManager> {
47 
48  timer_container a_timers;
49  anna::timex::Engine* a_timeController;
50 
51  TimerManager();
52  TimerManager(const TimerManager&);
53  virtual ~TimerManager() {;}
54 
55  Timer* createTimer(Response*) noexcept(false);
56  Timer* createTimer(Session*, const anna::diameter::comm::Timer::Type::_v type) noexcept(false);
57  Timer* createTimer(LocalServer*) noexcept(false);
58 
59  void cancelTimer(Timer*) ;
60 
61  void release(anna::timex::TimeEvent*) ;
62 
63  friend class anna::Singleton <TimerManager>;
64  friend class Response;
65  friend class Session;
66  friend class LocalServer;
67 };
68 
69 }
70 }
71 }
72 
73 #endif
74 
Definition: TimerManager.hpp:45
Definition: Timer.hpp:30
Definition: Singleton.hpp:76
_v
Definition: Timer.hpp:33
Definition: Response.hpp:44
Definition: TimeEvent.hpp:26
Definition: LocalServer.hpp:55
Definition: TimeEventObserver.hpp:33
Definition: app.hpp:12
Definition: Engine.hpp:62
Definition: Session.hpp:55