Remove warnings
[anna.git] / include / anna / ldap / TimerManager.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 anna_ldap_TimerManager_hpp
10 #define anna_ldap_TimerManager_hpp
11
12 #include <anna/config/defines.hpp>
13
14 #include <anna/core/util/Recycler.hpp>
15 #include <anna/core/Singleton.hpp>
16
17 #include <anna/ldap/defines.hpp>
18 #include <anna/ldap/ClassCode.hpp>
19 #include <anna/ldap/internal/Timer.hpp>
20
21 #include <anna/timex/TimeEventObserver.hpp>
22
23 namespace anna {
24
25 namespace timex {
26 class Engine;
27 }
28
29 namespace ldap {
30
31 class Response;
32
33 /**
34    Gestor de temporizadores asociados a las peticiones LDAP.
35 */
36 class TimerManager : public timex::TimeEventObserver, public Singleton <TimerManager> {
37   typedef Recycler <Timer> timer_container;
38
39   timer_container a_timers;
40   timex::Engine* a_timeController;
41
42   TimerManager();
43   TimerManager(const TimerManager&);
44
45   virtual ~TimerManager() {;}
46
47   Timer* createTimer(Response*) throw(RuntimeException);
48   void cancel(Timer*) throw();
49
50   void release(timex::TimeEvent*) throw();
51
52   friend class Singleton <TimerManager>;
53   friend class Response;
54 };
55
56 }
57 }
58
59 #endif
60