diff options
Diffstat (limited to 'TAO/orbsvcs/CosEvent_Service/CosEvent_Service.h')
-rw-r--r-- | TAO/orbsvcs/CosEvent_Service/CosEvent_Service.h | 128 |
1 files changed, 94 insertions, 34 deletions
diff --git a/TAO/orbsvcs/CosEvent_Service/CosEvent_Service.h b/TAO/orbsvcs/CosEvent_Service/CosEvent_Service.h index b4cfd607b1a..a914783d6e7 100644 --- a/TAO/orbsvcs/CosEvent_Service/CosEvent_Service.h +++ b/TAO/orbsvcs/CosEvent_Service/CosEvent_Service.h @@ -16,10 +16,20 @@ #ifndef COSEVENT_SERVICE_H #define COSEVENT_SERVICE_H -#include "orbsvcs/CosEvent_Utilities.h" +#include "orbsvcs/Naming/Naming_Utils.h" #include "orbsvcs/CosNamingC.h" - -class CosEvent_Service : public CosEC_ServantBase +#include "orbsvcs/Event_Utilities.h" +#include "orbsvcs/Event_Service_Constants.h" +#include "orbsvcs/Scheduler_Factory.h" +#include "orbsvcs/Time_Utilities.h" +#include "orbsvcs/RtecEventChannelAdminC.h" +#include "orbsvcs/Sched/Config_Scheduler.h" +#include "orbsvcs/Runtime_Scheduler.h" +#include "orbsvcs/Event/Event_Channel.h" +#include "orbsvcs/Event/Module_Factory.h" +#include "orbsvcs/CosEvent/EventChannel_i.h" + +class CosEvent_Service { // = TITLE // CosEvent_Service @@ -32,14 +42,10 @@ class CosEvent_Service : public CosEC_ServantBase CosEvent_Service (void); // Constructor. - virtual ~CosEvent_Service (void); + ~CosEvent_Service (void); // Destructor. - int parse_args (int argc, char *argv []); - // Parses the command line arguments. - - void startup (int argc, char *argv[], - CORBA::Environment &ACE_TRY_ENV); + int startup (int argc, char *argv[]); // Initializes the COS Event Service. // Returns 0 on success, -1 on error. @@ -47,51 +53,105 @@ class CosEvent_Service : public CosEC_ServantBase // run the COS Event Service. // Returns 0 on success, -1 on error. - void shutdown (CORBA::Environment &ACE_TRY_ENV = - CORBA::default_environment ()); + int shutdown (void); // Shutdown the COS Event Service. // Returns 0 on success, -1 on error. -protected: - // = Methods from CosEC_ServantBase - virtual POA_RtecEventChannelAdmin::EventChannel_ptr - create_rtec (CORBA::Environment &ACE_TRY_ENV); - // Create a local rtec. + private: + int init_ORB (int argc, char *argv []); + // initialize the ORB. + + int parse_args (int argc, char *argv []); + // Parses the command line arguments. + + int init_NamingService (void); + // Initializes the Naming Client. + // Returns 0 on success, -1 on error. + + int get_Rtec_viaNamingService (void); + // Gets a reference to a Rtec via the naming service. + // Returns 0 on success, -1 on error. - virtual void activate_rtec (CORBA::Environment &ACE_TRY_ENV); - // Activates the rtec. + int start_Scheduler (void); + // start the Scheduler used ny the RtEC. + // Returns 0 on success, -1 on error. - virtual void deactivate_rtec (CORBA::Environment &ACE_TRY_ENV); - // Deactivates the rtec. + int create_local_RtecService (void); + // Creates a local Rtec. + // Returns 0 on success, -1 on error. - void init_ORB (int argc, char *argv [], - CORBA::Environment &ACE_TRY_ENV); - // initialize the ORB. + void init_SupplierQOS (RtecScheduler::handle_t supp_handle); + // Initialize the SupplierQOS Factory. - void resolve_naming_service (CORBA::Environment &ACE_TRY_ENV); - // Resolve the naming service. + void init_ConsumerQOS (RtecScheduler::handle_t cons_handle); + // Initialize the ConsumerQOS Factory. - void locate_rtec (CORBA::Environment &ACE_TRY_ENV); - // Locate a rtec. + int create_CosEC (void); + // Creates a local CosEC. + // Returns 0 on success, -1 on error. + + int register_CosEC (void); + // Registers the Cos EC with the Naming Service. + // Returns 0 on success, -1 on error. - // = Data members const char* service_name; // The name we use to register with the Naming Service. const char* rt_service_name; // The name of the Real Time Event Service. - PortableServer::POA_var poa_; - // Reference to the root poa. + const char* schedule_name_; + // The name of the scheduler service. CORBA::ORB_var orb_; // The ORB that we use. - CosNaming::NamingContext_var naming_; - // A naming context. + TAO_Naming_Client naming_client_; + // An instance of the name client used for resolving the factory + // objects. + + TAO_Reactive_Module_Factory module_factory_; + // The Module_Factory required by the Rtec. + + ACE_Config_Scheduler scheduler_impl_; + // Scheduler used by the Rtec. + + RtecScheduler::Scheduler_var scheduler_; + // Reference to the Scheduler after activating it in the ORB. + + ACE_EventChannel *ec_impl_; + // The servant object of the Rtec. + + RtecEventChannelAdmin::EventChannel_var rtec_; + // Reference to the Rtec returned after activating it in the ORB. + + ACE_ConsumerQOS_Factory consumer_qos_; + // The Consumer QOS. - CORBA::Boolean remote_Rtec_; + ACE_SupplierQOS_Factory supplier_qos_; + // The Supplier QOS. + + TAO_CosEC_EventChannel_i ec_i_; + // The servant object of the COS Event Channel. + + CosEventChannelAdmin::EventChannel_ptr cos_ec_; + // Reference to the CosEC returned after activating it in the ORB. + + int global_scheduler_; + // Flag to indicate if the scheduler is local/global, + // 0 => local, 1 => global, default is local. + + int remote_Rtec_; // Flag to indicate if the RtEC is local/remote, - // 0 => local, 1 => remote, default is local. + // 0 => local, 1 => remote, default is remote. + + char* eventTypeIds_; + // The list of EventTypeIDs (for ConsumerQOS) seperated by spaces. e.g. "1 2 3 4" + + char* eventSourceIds_; + // The list of EventSourceIDs (for ConsumerQOS) seperated by spaces. e.g. "1 2 3 4" + + char *source_type_pairs_; + // The pairs of Source and EventType Ids (for the SupplierQOS). }; #endif /* COSEVENT_SERVICE_H */ |