2 //=============================================================================
4 * @file Notifier_Input_Handler.h
6 * Definition of the Callback_Quoter Notifier_Input_Handler class.
8 * @author Kirthika Parameswaran <kirthika@cs.wustl.edu>
10 //=============================================================================
13 #ifndef SUPPLIER_INPUT_HANDLER_H
14 #define SUPPLIER_INPUT_HANDLER_H
16 #include "Notifier_i.h"
17 #include "NotifierS.h"
18 #include "ace/Event_Handler.h"
19 #include "tao/Utils/ORB_Manager.h"
20 #include "orbsvcs/CosNamingS.h"
21 #include "orbsvcs/Naming/Naming_Client.h"
24 * @class Notifier_Input_Handler
26 * @brief The class defines the callback quoter Notifier initialization
29 * This class handles initialization tasks, as well, such as
30 * setting up the Orb manager and registers the Notifier servant
33 class Notifier_Input_Handler
: public ACE_Event_Handler
37 Notifier_Input_Handler ();
40 ~Notifier_Input_Handler ();
42 /// Initialize the Notifier who plays the role of the server here.
43 int init (int argc
, ACE_TCHAR
*argv
[]);
48 /// Handle the user input.
49 int handle_input (ACE_HANDLE
) override
;
52 /// The TAO orb manager object.
53 TAO_ORB_Manager orb_manager_
;
55 /// Parses the command line arguments.
58 /// Initialises the name server and registers the Notifier object
59 /// name with the name server.
60 int init_naming_service ();
62 /// File where the IOR of the Notifier object is stored.
63 FILE *ior_output_file_
;
65 /// Number of command line arguments.
68 /// The command line arguments.
71 /// Naming context for the naming service.
72 CosNaming::NamingContext_var naming_context_
;
74 /// helper class for getting access to Naming Service.
75 TAO_Naming_Client naming_server_
;
77 /// The servant object registered with the orb.
78 Notifier_i notifier_i_
;
80 /// This specifies whether the naming service is to be used.
81 int using_naming_service_
;
84 #endif /* NOTIFIER_INPUT_HANDLER_H */