00001 // -*- C++ -*- 00002 00003 /** 00004 * @file Properties.h 00005 * 00006 * $Id: Properties.h 81424 2008-04-24 14:02:21Z johnnyw $ 00007 * 00008 * @author Pradeep Gore <pradeep@oomworks.com> 00009 */ 00010 00011 #ifndef TAO_Notify_PROPERTIES_H 00012 #define TAO_Notify_PROPERTIES_H 00013 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/CosNotificationC.h" 00023 00024 #include "tao/PortableServer/PortableServer.h" 00025 00026 #include "tao/TAO_Singleton.h" 00027 #include "tao/ORB.h" 00028 00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00030 00031 class TAO_Notify_Factory; 00032 class TAO_Notify_Builder; 00033 00034 /** 00035 * @class TAO_Notify_Properties 00036 * 00037 * @brief Global properties that strategize Notify's run-time behaviour. 00038 * 00039 */ 00040 class TAO_Notify_Serv_Export TAO_Notify_Properties 00041 { 00042 public: 00043 /// Constructor 00044 TAO_Notify_Properties (void); 00045 00046 /// Destructor 00047 ~TAO_Notify_Properties (); 00048 00049 /// Return a singleton instance of this class. 00050 static TAO_Notify_Properties * instance (void); 00051 00052 static void close (void); 00053 00054 // = Property Accessors 00055 TAO_Notify_Factory* factory (void); 00056 void factory (TAO_Notify_Factory* factory); 00057 00058 TAO_Notify_Builder* builder (void); 00059 void builder (TAO_Notify_Builder* builder); 00060 00061 CORBA::ORB_ptr orb (void); 00062 void orb (CORBA::ORB_ptr orb); 00063 CORBA::ORB_ptr dispatching_orb (void); 00064 void dispatching_orb (CORBA::ORB_ptr dispatching_orb); 00065 00066 PortableServer::POA_ptr default_poa (void); 00067 void default_poa (PortableServer::POA_ptr default_poa); 00068 00069 CORBA::Boolean asynch_updates (void); 00070 void asynch_updates (CORBA::Boolean asynch_updates); 00071 00072 bool allow_reconnect (void); 00073 void allow_reconnect (bool b); 00074 00075 // Turn on/off update messages. 00076 CORBA::Boolean updates (void); 00077 void updates (CORBA::Boolean updates); 00078 bool separate_dispatching_orb (void); 00079 void separate_dispatching_orb (bool b); 00080 00081 // The QoS Property that must be applied to each newly created Event Channel 00082 const CosNotification::QoSProperties& default_event_channel_qos_properties (void); 00083 00084 // Set the default EC QoS Property. 00085 void default_event_channel_qos_properties (const CosNotification::QoSProperties &ec_qos); 00086 00087 // The QoS Property that must be applied to each newly created Supplier Admin 00088 const CosNotification::QoSProperties& default_supplier_admin_qos_properties (void); 00089 00090 // Set the default SA QoS Property. 00091 void default_supplier_admin_qos_properties (const CosNotification::QoSProperties &sa_qos); 00092 00093 // The QoS Property that must be applied to each newly created Consumer Admin 00094 const CosNotification::QoSProperties& default_consumer_admin_qos_properties (void); 00095 00096 // Set the default CA QoS Property. 00097 void default_consumer_admin_qos_properties (const CosNotification::QoSProperties &ca_qos); 00098 00099 // The QoS Property that must be applied to each newly created Proxy Supplier 00100 const CosNotification::QoSProperties& default_proxy_supplier_qos_properties (void); 00101 00102 // Set the default PS QoS Property. 00103 void default_proxy_supplier_qos_properties (const CosNotification::QoSProperties &ps_qos); 00104 00105 // The QoS Property that must be applied to each newly created Proxy Consumer 00106 const CosNotification::QoSProperties& default_proxy_consumer_qos_properties (void); 00107 00108 // Set the default PC QoS Property. 00109 void default_proxy_consumer_qos_properties (const CosNotification::QoSProperties &pc_qos); 00110 00111 protected: 00112 /// Object Factory 00113 TAO_Notify_Factory* factory_; 00114 00115 /// Object Builder 00116 TAO_Notify_Builder* builder_; 00117 00118 /// ORB 00119 CORBA::ORB_var orb_; 00120 00121 /// dispatching orb 00122 CORBA::ORB_var dispatching_orb_; 00123 00124 /// POA 00125 PortableServer::POA_var default_poa_; 00126 00127 /// True if send asynch updates. 00128 CORBA::Boolean asynch_updates_; 00129 00130 /// True if clients can reconnect to proxies. 00131 bool allow_reconnect_; 00132 00133 /// True is separate dispatching orb 00134 bool separate_dispatching_orb_; 00135 00136 /// True if updates are enabled (default). 00137 CORBA::Boolean updates_; 00138 00139 /// The Update period for updates. 00140 ACE_Time_Value update_period_; 00141 00142 /// The default EC QoS Properties. 00143 CosNotification::QoSProperties ec_qos_; 00144 00145 /// The default SA QoS Properties. 00146 CosNotification::QoSProperties sa_qos_; 00147 00148 /// The default CA QoS Properties. 00149 CosNotification::QoSProperties ca_qos_; 00150 00151 /// The default PS QoS Properties. 00152 CosNotification::QoSProperties ps_qos_; 00153 00154 /// The default PC QoS Properties. 00155 CosNotification::QoSProperties pc_qos_; 00156 }; 00157 00158 /** 00159 * @todo Remove this legacy TAO_Notify_Properties typedef. 00160 */ 00161 typedef TAO_Notify_Properties TAO_Notify_PROPERTIES; 00162 00163 TAO_END_VERSIONED_NAMESPACE_DECL 00164 00165 #if defined (__ACE_INLINE__) 00166 #include "orbsvcs/Notify/Properties.inl" 00167 #endif /* __ACE_INLINE__ */ 00168 00169 #include /**/ "ace/post.h" 00170 00171 #endif /* TAO_Notify_PROPERTIES_H */