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 (void);
40 ~Notifier_Input_Handler (void);
42 /// Initialize the Notifier who plays the role of the server here.
49 /// Handle the user input.
50 virtual int handle_input (ACE_HANDLE
);
54 /// The tao orb manager object.
55 TAO_ORB_Manager orb_manager_
;
57 /// Parses the command line arguments.
58 int parse_args (void);
60 /// Initialises the name server and registers the Notifier object
61 /// name with the name server.
62 int init_naming_service (void);
64 /// File where the IOR of the Notifier object is stored.
65 FILE *ior_output_file_
;
67 /// Number of command line arguments.
70 /// The command line arguments.
73 /// Naming context for the naming service.
74 CosNaming::NamingContext_var naming_context_
;
76 /// helper class for getting access to Naming Service.
77 TAO_Naming_Client naming_server_
;
79 /// The servant object registered with the orb.
80 Notifier_i notifier_i_
;
82 /// This specifies whether the naming service is to be used.
83 int using_naming_service_
;
86 #endif /* NOTIFIER_INPUT_HANDLER_H */