Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / orbsvcs / Time_Service / Server_i.h
blob5a967d63148426ba231f16115b61fcefe890a61f
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Server_i.h
7 * @author Vishal Kachroo <vishal@cs.wustl.edu>
8 */
9 //=============================================================================
12 #ifndef SERVER_I_H
13 #define SERVER_I_H
15 #include "ace/Get_Opt.h"
16 #include "ace/Log_Msg.h"
17 #include "tao/Utils/ORB_Manager.h"
18 #include "orbsvcs/CosNamingC.h"
19 #include "orbsvcs/Naming/Naming_Client.h"
20 #include "orbsvcs/Time/TAO_Time_Service_Server.h"
22 /**
23 * @class Server_i
25 * @brief CORBA Server implementation.
27 * A CORBA server that initializes the <TimeService Server>
28 * servant implementation and the ORB.
30 class Server_i
32 public:
33 /// Constructor.
34 Server_i ();
36 /// Destructor.
37 ~Server_i ();
39 /// Initialize the Server state.
40 int init (int argc,
41 ACE_TCHAR *argv[]);
43 /// Run the orb.
44 int run ();
46 /// Initialises the name client.
47 int init_naming_service ();
49 /// Create the time server object.
50 int create_server ();
52 /// Register the time server object with the Naming Service.
53 int register_server ();
55 /// Parse the commandline arguments.
56 int parse_args (int argc,
57 ACE_TCHAR* argv[]);
59 private:
60 /// My orb.
61 CORBA::ORB_var orb_;
63 /// The ORB manager.
64 TAO_ORB_Manager orb_manager_;
66 /// File where the IOR of the Clerk object is stored.
67 FILE *ior_output_file_;
69 /// An instance of the name server used for registering the
70 /// <TimeService Server> object.
71 TAO_Naming_Client naming_client_;
73 /// Implementation of the <TimeService> Server object.
74 TAO_Time_Service_Server *time_service_server_impl_;
76 /// Reference of the time server.
77 CosTime::TimeService_var time_service_server_;
79 /// Naming context for the Naming Service.
80 CosNaming::NamingContext_var time_service_server_context_;
83 #endif /* SERVER_I_H */