Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / orbsvcs / ImplRepo_Service / Locator_NT_Service.h
blobc1a34f39d3d9f1a8b459fac870078ff684164a74
1 /* -*- C++ -*- */
2 //=============================================================================
3 /**
4 * @file Locator_NT_Service.h
6 * @author Darrell Brunsch <brunsch@cs.wustl.edu>
7 * @author Jeff Parsons <parsons@cs.wustl.edu>
8 * @author John Tucker <jtucker@infoglide.com>
9 * @author Mike Vitalo <mvitalo@infoglide.com>
11 //=============================================================================
13 #ifndef Locator_NT_Service_H
14 #define Locator_NT_Service_H
16 #include "ace/config-all.h"
18 #if defined (ACE_WIN32) && !defined (ACE_LACKS_WIN32_SERVICES)
20 #include "ace/NT_Service.h"
21 #include "ace/Singleton.h"
22 #include "ace/Synch.h"
23 #include "tao/orbconf.h"
25 extern const ACE_TCHAR* IMR_LOCATOR_SERVICE_NAME;
26 extern const ACE_TCHAR* IMR_LOCATOR_DISPLAY_NAME;
27 extern const ACE_TCHAR* IMR_LOCATOR_DESCRIPTION;
29 /**
30 * @class Locator_NT_Service
32 * @brief Allows the Implementation Repository to act as a Windows NT Service.
34 class Locator_NT_Service : public ACE_NT_Service
36 public:
37 typedef TAO_SYNCH_RECURSIVE_MUTEX MUTEX;
39 /// We override <handle_control> because it handles stop requests
40 /// privately.
41 virtual void handle_control (DWORD control_code);
43 /// We override <handle_exception> so a 'stop' control code can wake
44 /// the reactor off of its wait.
45 virtual int handle_exception (ACE_HANDLE h);
47 /// This is a virtual method inherited from ACE_NT_Service.
48 virtual int svc (void);
50 private:
51 friend class ACE_Singleton<Locator_NT_Service, MUTEX>;
54 typedef ACE_Singleton<Locator_NT_Service, ACE_Mutex> SERVICE;
56 #endif /* ACE_WIN32 && !ACE_LACKS_WIN32_SERVICES */
58 #endif /* Locator_NT_Service_H */