ACE+TAO-7_0_8
[ACE_TAO.git] / TAO / orbsvcs / FT_Naming_Service / FT_Naming_Service.h
blobacd6971f46efe2312b6926fe2c3468916919e06b
1 // -*- C++ -*-
3 //==========================================================================
4 /**
5 * @file FT_Naming_Service.h
7 * This class provides an override for the Naming_Service class factory
8 * method: create_naming_server ()
10 * @author Kevin Stanley <stanleyk@ociweb.com>
12 //==========================================================================
15 #ifndef TAO_FT_NAMING_SERVICE_H
16 #define TAO_FT_NAMING_SERVICE_H
18 #include "tao/ORB.h"
19 #include "orbsvcs/Naming/FaultTolerant/FT_Naming_Server.h"
22 /**
23 * @class TAO_FT_Naming_Service
25 * @brief Defines a class that encapsulates the implementation of the
26 * Fault Tolerant Naming Service.
28 class TAO_FT_Naming_Service
30 public:
31 /// Default Constructor.
32 TAO_FT_Naming_Service (void);
34 /// Constructor taking the command-line arguments.
35 TAO_FT_Naming_Service (int argc, ACE_TCHAR* argv[]);
37 /// Initialize the Naming Service with the arguments.
38 virtual int init (int argc, ACE_TCHAR* argv[]);
40 /// The opposite of init().
41 virtual int fini ();
43 /// Run the TAO_Naming_Service.
44 virtual int run (void);
46 /// Shut down the TAO_Naming_Service; you must still call fini().
47 virtual void shutdown (void);
49 /// Destructor.
50 virtual ~TAO_FT_Naming_Service (void);
52 protected:
54 /// Parse the command line arguments to find
55 /// the timeout period.
56 int parse_args (int &argc, ACE_TCHAR* argv[]);
58 /// The ORB.
59 CORBA::ORB_var orb_;
61 /// Naming Server instance.
62 TAO_FT_Naming_Server my_naming_server_;
64 /// After how long the server should stop listening to requests (in
65 /// seconds).
66 long time_;
68 /// Number of threads for running the ORB. Default is 1
69 int num_threads_;
72 #endif /* TAO_FT_NAMING_SERVICE_H */