#include <EC_Gateway_IIOP_Factory.h>
Inheritance diagram for TAO_EC_Gateway_IIOP_Factory:
Public Member Functions | |
TAO_EC_Gateway_IIOP_Factory (void) | |
virtual | ~TAO_EC_Gateway_IIOP_Factory (void) |
TAO_ECG_ConsumerEC_Control * | create_consumerec_control (TAO_EC_Gateway_IIOP *gateway) |
Create the consumer event channel control. | |
void | destroy_consumerec_control (TAO_ECG_ConsumerEC_Control *x) |
Destroy consumer event channel control. | |
int | use_ttl (void) const |
Accessors to use_ttl flag. | |
int | use_consumer_proxy_map (void) const |
Accessors to use_consumer_proxy_map flag. | |
virtual int | init (int argc, char *argv[]) |
virtual int | fini (void) |
Static Public Member Functions | |
int | init_svcs (void) |
Protected Attributes | |
ACE_CString | orbid_ |
Use this ORB to locate global resources. | |
int | consumer_ec_control_ |
The control policy for the consumer event channel. | |
int | consumer_ec_control_period_ |
The consumer event channel control periods in usecs. | |
ACE_Time_Value | consumer_ec_control_timeout_ |
The control timeout in usecs for the consumer event channel. | |
int | use_ttl_ |
int | use_consumer_proxy_map_ |
Private Member Functions | |
void | unsupported_option_value (const char *option_name, const char *option_value) |
Default configuration values can be found in ECG_Defaults.h
Definition at line 42 of file EC_Gateway_IIOP_Factory.h.
|
Definition at line 34 of file EC_Gateway_IIOP_Factory.cpp. References TAO_ECG_DEFAULT_IIOP_CONSUMEREC_CONTROL, TAO_ECG_DEFAULT_IIOP_CONSUMEREC_CONTROL_PERIOD, TAO_ECG_DEFAULT_IIOP_CONSUMEREC_CONTROL_TIMEOUT, TAO_ECG_DEFAULT_IIOP_ORB_ID, TAO_ECG_DEFAULT_IIOP_USE_CONSUMER_PROXY_MAP, and TAO_ECG_DEFAULT_IIOP_USE_TTL.
00035 : orbid_ (TAO_ECG_DEFAULT_IIOP_ORB_ID), 00036 consumer_ec_control_ (TAO_ECG_DEFAULT_IIOP_CONSUMEREC_CONTROL), 00037 consumer_ec_control_period_ (TAO_ECG_DEFAULT_IIOP_CONSUMEREC_CONTROL_PERIOD), 00038 consumer_ec_control_timeout_ (TAO_ECG_DEFAULT_IIOP_CONSUMEREC_CONTROL_TIMEOUT), 00039 use_ttl_ (TAO_ECG_DEFAULT_IIOP_USE_TTL), 00040 use_consumer_proxy_map_ (TAO_ECG_DEFAULT_IIOP_USE_CONSUMER_PROXY_MAP) 00041 { 00042 } |
|
Definition at line 44 of file EC_Gateway_IIOP_Factory.cpp.
00045 { 00046 } |
|
Create the consumer event channel control.
Definition at line 172 of file EC_Gateway_IIOP_Factory.cpp. References consumer_ec_control_, consumer_ec_control_timeout_, CORBA::ORB_init(), TAO_ECG_ConsumerEC_Control, TAO_ECG_Reactive_ConsumerEC_Control, and TAO_ECG_Reconnect_ConsumerEC_Control. Referenced by TAO_EC_Gateway_IIOP::init_i().
00173 { 00174 if (this->consumer_ec_control_ == 0) 00175 return new TAO_ECG_ConsumerEC_Control (); 00176 else if (this->consumer_ec_control_ == 1) 00177 { 00178 int argc = 0; 00179 char **argv = 0; 00180 CORBA::ORB_var orb = 00181 CORBA::ORB_init (argc, argv, this->orbid_.c_str ()); 00182 ACE_Time_Value rate (0, this->consumer_ec_control_period_); 00183 return new TAO_ECG_Reactive_ConsumerEC_Control (rate, consumer_ec_control_timeout_, gateway, orb.in ()); 00184 } 00185 else if (this->consumer_ec_control_ == 2) 00186 { 00187 int argc = 0; 00188 char **argv = 0; 00189 CORBA::ORB_var orb = 00190 CORBA::ORB_init (argc, argv, this->orbid_.c_str ()); 00191 ACE_Time_Value rate (0, this->consumer_ec_control_period_); 00192 return new TAO_ECG_Reconnect_ConsumerEC_Control (rate, consumer_ec_control_timeout_, gateway, orb.in ()); 00193 } 00194 return 0; 00195 } |
|
Destroy consumer event channel control.
Definition at line 198 of file EC_Gateway_IIOP_Factory.cpp.
00200 {
00201 delete x;
00202 }
|
|
Reimplemented from ACE_Shared_Object. Definition at line 49 of file EC_Gateway_IIOP_Factory.cpp.
00050 {
00051 return 0;
00052 }
|
|
Definition at line 55 of file EC_Gateway_IIOP_Factory.cpp. References ACE_Arg_Shifter, ACE_DEBUG, ACE_TCHAR, ACE_TEXT, ACE_TEXT_ALWAYS_CHAR, ACE_OS::atoi(), consumer_ec_control_, consumer_ec_control_period_, consumer_ec_control_timeout_, LM_WARNING, ACE_OS::strcasecmp(), ACE_OS::strtoul(), unsupported_option_value(), and ACE_Time_Value::usec().
00056 { 00057 int result = 0; 00058 00059 ACE_Arg_Shifter arg_shifter (argc, argv); 00060 00061 while (arg_shifter.is_anything_left ()) 00062 { 00063 const char *arg = arg_shifter.get_current (); 00064 00065 if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECGIIOPConsumerECControl")) == 0) 00066 { 00067 arg_shifter.consume_arg (); 00068 00069 if (arg_shifter.is_parameter_next ()) 00070 { 00071 const ACE_TCHAR* opt = arg_shifter.get_current (); 00072 if (ACE_OS::strcasecmp (opt, ACE_TEXT("null")) == 0) 00073 this->consumer_ec_control_ = 0; 00074 else if (ACE_OS::strcasecmp (opt, ACE_TEXT("reactive")) == 0) 00075 this->consumer_ec_control_ = 1; 00076 else if (ACE_OS::strcasecmp (opt, ACE_TEXT("reconnect")) == 0) 00077 this->consumer_ec_control_ = 2; 00078 else 00079 this->unsupported_option_value ("-ECGIIOPConsumerECControl", opt); 00080 arg_shifter.consume_arg (); 00081 } 00082 } 00083 00084 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECGIIOPConsumerECControlPeriod")) == 0) 00085 { 00086 arg_shifter.consume_arg (); 00087 00088 if (arg_shifter.is_parameter_next ()) 00089 { 00090 const ACE_TCHAR* opt = arg_shifter.get_current (); 00091 this->consumer_ec_control_period_ = ACE_OS::atoi (opt); 00092 arg_shifter.consume_arg (); 00093 } 00094 } 00095 00096 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECGIIOPConsumerECControlTimeout")) == 0) 00097 { 00098 arg_shifter.consume_arg (); 00099 00100 if (arg_shifter.is_parameter_next ()) 00101 { 00102 const ACE_TCHAR* opt = arg_shifter.get_current (); 00103 unsigned long timeout = ACE_OS::strtoul(opt, 0, 10); 00104 this->consumer_ec_control_timeout_.usec(timeout); 00105 arg_shifter.consume_arg (); 00106 } 00107 } 00108 00109 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECGIIOPUseORBId")) == 0) 00110 { 00111 arg_shifter.consume_arg (); 00112 00113 if (arg_shifter.is_parameter_next ()) 00114 { 00115 // Save argument for later use 00116 this->orbid_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ()); 00117 arg_shifter.consume_arg (); 00118 } 00119 } 00120 00121 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECGIIOPUseTTL")) == 0) 00122 { 00123 arg_shifter.consume_arg (); 00124 00125 if (arg_shifter.is_parameter_next ()) 00126 { 00127 const ACE_TCHAR* opt = arg_shifter.get_current (); 00128 this->use_ttl_ = ACE_OS::atoi (opt); 00129 arg_shifter.consume_arg (); 00130 } 00131 } 00132 00133 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECGIIOPUseConsumerProxyMap")) == 0) 00134 { 00135 arg_shifter.consume_arg (); 00136 00137 if (arg_shifter.is_parameter_next ()) 00138 { 00139 const ACE_TCHAR* opt = arg_shifter.get_current (); 00140 this->use_consumer_proxy_map_ = ACE_OS::atoi (opt); 00141 arg_shifter.consume_arg (); 00142 } 00143 } 00144 00145 else 00146 { 00147 arg_shifter.ignore_arg (); 00148 ACE_DEBUG ((LM_WARNING, 00149 "Ignoring <%s> option " 00150 "during initialization.\n", 00151 arg)); 00152 result = -1; 00153 } 00154 } 00155 00156 return result; 00157 } |
|
Helper function to register the Gateway into the service configurator. Definition at line 28 of file EC_Gateway_IIOP_Factory.cpp. References ACE_Service_Config::static_svcs().
00029 { 00030 return ACE_Service_Config::static_svcs ()-> 00031 insert (&ace_svc_desc_TAO_EC_Gateway_IIOP_Factory); 00032 } |
|
Helper for agrument parsing. Prints out an error message about unsupported option value. Definition at line 160 of file EC_Gateway_IIOP_Factory.cpp. References ACE_ERROR, and LM_ERROR. Referenced by init().
00162 { 00163 ACE_ERROR ((LM_ERROR, 00164 "EC_Gateway_IIOP_Factory -" 00165 "Unsupported <%s> option value: <%s>. " 00166 "Ignoring this option - using defaults instead.\n", 00167 option_name, 00168 option_value)); 00169 } |
|
Accessors to use_consumer_proxy_map flag.
Definition at line 14 of file EC_Gateway_IIOP_Factory.i. Referenced by TAO_EC_Gateway_IIOP::TAO_EC_Gateway_IIOP().
00015 { 00016 return this->use_consumer_proxy_map_; 00017 } |
|
Accessors to use_ttl flag.
Definition at line 8 of file EC_Gateway_IIOP_Factory.i. Referenced by TAO_EC_Gateway_IIOP::TAO_EC_Gateway_IIOP().
00009 { 00010 return this->use_ttl_; 00011 } |
|
The control policy for the consumer event channel.
Definition at line 83 of file EC_Gateway_IIOP_Factory.h. Referenced by create_consumerec_control(), and init(). |
|
The consumer event channel control periods in usecs.
Definition at line 86 of file EC_Gateway_IIOP_Factory.h. Referenced by init(). |
|
The control timeout in usecs for the consumer event channel.
Definition at line 89 of file EC_Gateway_IIOP_Factory.h. Referenced by create_consumerec_control(), and init(). |
|
Use this ORB to locate global resources.
Definition at line 80 of file EC_Gateway_IIOP_Factory.h. |
|
The flag for using the consumer proxy map. With 1 the consumer proxy map is used, meaning that for each unique source id we use a different proxy push consumer, if 0, we only use one proxy push consumer for all source ids. Definition at line 101 of file EC_Gateway_IIOP_Factory.h. |
|
If 1, we use the TTL flags, if 0, we just ignore TTL.
Definition at line 95 of file EC_Gateway_IIOP_Factory.h. |