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