00001 /* -*- C++ -*- */ 00002 /** 00003 * @file CosNotify_Service.h 00004 * 00005 * $Id: CosNotify_Service.h 81639 2008-05-07 18:45:12Z johnnyw $ 00006 * 00007 * @author Pradeep Gore <pradeep@oomworks.com> 00008 * 00009 * 00010 */ 00011 00012 #ifndef TAO_Notify_COSNOTIFY_SERVICE_H 00013 #define TAO_Notify_COSNOTIFY_SERVICE_H 00014 #include /**/ "ace/pre.h" 00015 00016 #include "orbsvcs/Notify/notify_serv_export.h" 00017 00018 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00019 # pragma once 00020 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00021 00022 #include "orbsvcs/Notify/Service.h" 00023 #include "orbsvcs/Notify/Builder.h" 00024 #include "orbsvcs/Notify/Factory.h" 00025 00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00027 00028 class TAO_Notify_Properties; 00029 class TAO_Notify_EventChannelFactory; 00030 00031 /** 00032 * @class TAO_CosNotify_Service 00033 * 00034 * @brief A service object for creating the Notify Service Factory. 00035 * 00036 */ 00037 class TAO_Notify_Serv_Export TAO_CosNotify_Service : public TAO_Notify_Service 00038 { 00039 public: 00040 /// Constructor 00041 TAO_CosNotify_Service (void); 00042 00043 /// Destructor 00044 virtual ~TAO_CosNotify_Service (); 00045 00046 /// Init the service from configurator 00047 virtual int init (int argc, ACE_TCHAR *argv[]); 00048 00049 /// Init the service from driver 00050 virtual void init_service (CORBA::ORB_ptr orb); 00051 00052 virtual int fini (void); 00053 00054 /// separate dispatching orb init 00055 virtual void init_service2 (CORBA::ORB_ptr orb, CORBA::ORB_ptr dispatching_orb); 00056 00057 /// Finalize the service. 00058 virtual void finalize_service ( 00059 CosNotifyChannelAdmin::EventChannelFactory_ptr factory); 00060 00061 /// Create the Channel Factory. 00062 virtual CosNotifyChannelAdmin::EventChannelFactory_ptr create ( 00063 PortableServer::POA_ptr default_POA, 00064 const char* factory_name = "EventChannelFactory"); 00065 00066 /// Called by the factory when it is destroyed. 00067 virtual void remove (TAO_Notify_EventChannelFactory* ecf); 00068 00069 protected: 00070 /// Init the data members 00071 virtual void init_i (CORBA::ORB_ptr orb); 00072 /// Init the data members separate dispatching orb 00073 virtual void init_i2 (CORBA::ORB_ptr orb, CORBA::ORB_ptr dispatching_orb); 00074 00075 private: 00076 00077 /// Create the Factory for Notify objects. 00078 virtual TAO_Notify_Factory* create_factory (void); 00079 00080 /// Create the Builder for Notify objects. 00081 virtual TAO_Notify_Builder* create_builder (void); 00082 00083 /// Set thread options on @a qos. 00084 void set_threads (CosNotification::QoSProperties &qos, int threads); 00085 00086 TAO_Notify_Factory& factory(); 00087 00088 /// Service component for building NS participants. 00089 TAO_Notify_Builder& builder(); 00090 00091 /// Service component for object factory operations. 00092 ACE_Auto_Ptr< TAO_Notify_Factory > factory_; 00093 00094 /// Service component for building NS participants. 00095 ACE_Auto_Ptr< TAO_Notify_Builder > builder_; 00096 }; 00097 00098 TAO_END_VERSIONED_NAMESPACE_DECL 00099 00100 ACE_STATIC_SVC_DECLARE (TAO_CosNotify_Service) 00101 ACE_FACTORY_DECLARE (TAO_Notify_Serv, TAO_CosNotify_Service) 00102 00103 ACE_STATIC_SVC_DECLARE (TAO_Notify_Default_EMO_Factory_OLD) 00104 00105 #include /**/ "ace/post.h" 00106 #endif /* TAO_Notify_COSNOTIFY_SERVICE_H */