#include <CEC_Default_Factory.h>
Inheritance diagram for TAO_CEC_Default_Factory:


This class allows the user to experiment with different EC configurations. Using a command-line like interface the user can specify which strategies will this factory generate. Since the class can be dynamically loaded the strategies can be set in the service configurator file. = MEMORY MANAGMENT
Definition at line 44 of file CEC_Default_Factory.h.
|
|
|
destructor...
Definition at line 47 of file CEC_Default_Factory.cpp. References ACE_OS::free(), and orbid_dupped_.
00048 {
00049 if (orbid_dupped_ != 0)
00050 {
00051 ACE_OS::free (orbid_);
00052 }
00053 }
|
|
|
Create and destroy the consumer admin implementation.
Implements TAO_CEC_Factory. Definition at line 470 of file CEC_Default_Factory.cpp.
00471 {
00472 return new TAO_CEC_ConsumerAdmin (ec);
00473 }
|
|
|
The ConsumerControl and SupplierControl strategies are used to discard non-existent consumers and suppliers Implements TAO_CEC_Factory. Definition at line 1226 of file CEC_Default_Factory.cpp. References consumer_control_, and CORBA::ORB_init().
01227 {
01228 if (this->consumer_control_ == 0)
01229 return new TAO_CEC_ConsumerControl ();
01230 else if (this->consumer_control_ == 1)
01231 {
01232 int argc = 0;
01233 char **argv = 0;
01234 CORBA::ORB_var orb =
01235 CORBA::ORB_init (argc, argv, this->orbid_);
01236
01237 ACE_Time_Value rate (0, this->consumer_control_period_);
01238 return new TAO_CEC_Reactive_ConsumerControl (
01239 rate, this->consumer_control_timeout_,
01240 this->proxy_disconnect_retries_,
01241 ec, orb.in ());
01242 }
01243 return 0;
01244 }
|
|
|
Create and destroy the locking strategies for both ProxyPushConsumers and ProxyPushSuppliers Implements TAO_CEC_Factory. Definition at line 1190 of file CEC_Default_Factory.cpp. References consumer_lock_.
01191 {
01192 if (this->consumer_lock_ == 0)
01193 return new ACE_Lock_Adapter<ACE_Null_Mutex>;
01194 else if (this->consumer_lock_ == 1)
01195 return new ACE_Lock_Adapter<TAO_SYNCH_MUTEX> ();
01196 else if (this->consumer_lock_ == 2)
01197 return new ACE_Lock_Adapter<TAO_SYNCH_RECURSIVE_MUTEX> ();
01198 return 0;
01199 }
|
|
|
Create and destroy the dispatching module.
Implements TAO_CEC_Factory. Definition at line 412 of file CEC_Default_Factory.cpp. References dispatching_.
00413 {
00414 if (this->dispatching_ == 0)
00415 return new TAO_CEC_Reactive_Dispatching ();
00416 else if (this->dispatching_ == 1)
00417 return new TAO_CEC_MT_Dispatching (this->dispatching_threads_,
00418 this->dispatching_threads_flags_,
00419 this->dispatching_threads_priority_,
00420 this->dispatching_threads_force_active_);
00421 return 0;
00422 }
|
|
|
Create and destroy a ProxyPullConsumer.
Implements TAO_CEC_Factory. Definition at line 586 of file CEC_Default_Factory.cpp. References TAO_CEC_ProxyPullConsumer.
00587 {
00588 return new TAO_CEC_ProxyPullConsumer (ec);
00589 }
|
|
|
|
Create and destroy a ProxyPullSupplier.
Implements TAO_CEC_Factory. Definition at line 546 of file CEC_Default_Factory.cpp.
00547 {
00548 return new TAO_CEC_ProxyPullSupplier (ec);
00549 }
|
|
|
Create and destroy a collection of TAO_CEC_ProxyPullSuppliers.
Implements TAO_CEC_Factory. Definition at line 1097 of file CEC_Default_Factory.cpp. References ACE_SYNCH, supplier_collection_, TAO_CEC_PullSupplier_List_Iterator, TAO_CEC_PullSupplier_RB_Tree_Iterator, and TAO_SYNCH_MUTEX.
01098 {
01099 if (this->supplier_collection_ == 0x000)
01100 return new TAO_ESF_Immediate_Changes<TAO_CEC_ProxyPullSupplier,
01101 TAO_ESF_Proxy_List<TAO_CEC_ProxyPullSupplier>,
01102 TAO_CEC_PullSupplier_List_Iterator,
01103 TAO_SYNCH_MUTEX> ();
01104 else if (this->supplier_collection_ == 0x001)
01105 return new TAO_ESF_Copy_On_Read<TAO_CEC_ProxyPullSupplier,
01106 TAO_ESF_Proxy_List<TAO_CEC_ProxyPullSupplier>,
01107 TAO_CEC_PullSupplier_List_Iterator,
01108 TAO_SYNCH_MUTEX> ();
01109 else if (this->supplier_collection_ == 0x002)
01110 return new TAO_ESF_Copy_On_Write<TAO_CEC_ProxyPullSupplier,
01111 TAO_ESF_Proxy_List<TAO_CEC_ProxyPullSupplier>,
01112 TAO_CEC_PullSupplier_List_Iterator,
01113 ACE_SYNCH> ();
01114 else if (this->supplier_collection_ == 0x003)
01115 return new TAO_ESF_Delayed_Changes<TAO_CEC_ProxyPullSupplier,
01116 TAO_ESF_Proxy_List<TAO_CEC_ProxyPullSupplier>,
01117 TAO_CEC_PullSupplier_List_Iterator,
01118 ACE_SYNCH> ();
01119 else if (this->supplier_collection_ == 0x010)
01120 return new TAO_ESF_Immediate_Changes<TAO_CEC_ProxyPullSupplier,
01121 TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPullSupplier>,
01122 TAO_CEC_PullSupplier_RB_Tree_Iterator,
01123 TAO_SYNCH_MUTEX> ();
01124 else if (this->supplier_collection_ == 0x011)
01125 return new TAO_ESF_Copy_On_Read<TAO_CEC_ProxyPullSupplier,
01126 TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPullSupplier>,
01127 TAO_CEC_PullSupplier_RB_Tree_Iterator,
01128 TAO_SYNCH_MUTEX> ();
01129 else if (this->supplier_collection_ == 0x012)
01130 return new TAO_ESF_Copy_On_Write<TAO_CEC_ProxyPullSupplier,
01131 TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPullSupplier>,
01132 TAO_CEC_PullSupplier_RB_Tree_Iterator,
01133 ACE_SYNCH> ();
01134 else if (this->supplier_collection_ == 0x013)
01135 return new TAO_ESF_Delayed_Changes<TAO_CEC_ProxyPullSupplier,
01136 TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPullSupplier>,
01137 TAO_CEC_PullSupplier_RB_Tree_Iterator,
01138 ACE_SYNCH> ();
01139 else if (this->supplier_collection_ == 0x100)
01140 return new TAO_ESF_Immediate_Changes<TAO_CEC_ProxyPullSupplier,
01141 TAO_ESF_Proxy_List<TAO_CEC_ProxyPullSupplier>,
01142 TAO_CEC_PullSupplier_List_Iterator,
01143 ACE_Null_Mutex> ();
01144 else if (this->supplier_collection_ == 0x101)
01145 return new TAO_ESF_Copy_On_Read<TAO_CEC_ProxyPullSupplier,
01146 TAO_ESF_Proxy_List<TAO_CEC_ProxyPullSupplier>,
01147 TAO_CEC_PullSupplier_List_Iterator,
01148 ACE_Null_Mutex> ();
01149 else if (this->supplier_collection_ == 0x102)
01150 return new TAO_ESF_Copy_On_Write<TAO_CEC_ProxyPullSupplier,
01151 TAO_ESF_Proxy_List<TAO_CEC_ProxyPullSupplier>,
01152 TAO_CEC_PullSupplier_List_Iterator,
01153 ACE_NULL_SYNCH> ();
01154 else if (this->supplier_collection_ == 0x103)
01155 return new TAO_ESF_Delayed_Changes<TAO_CEC_ProxyPullSupplier,
01156 TAO_ESF_Proxy_List<TAO_CEC_ProxyPullSupplier>,
01157 TAO_CEC_PullSupplier_List_Iterator,
01158 ACE_NULL_SYNCH> ();
01159 else if (this->supplier_collection_ == 0x110)
01160 return new TAO_ESF_Immediate_Changes<TAO_CEC_ProxyPullSupplier,
01161 TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPullSupplier>,
01162 TAO_CEC_PullSupplier_RB_Tree_Iterator,
01163 ACE_Null_Mutex> ();
01164 else if (this->supplier_collection_ == 0x111)
01165 return new TAO_ESF_Copy_On_Read<TAO_CEC_ProxyPullSupplier,
01166 TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPullSupplier>,
01167 TAO_CEC_PullSupplier_RB_Tree_Iterator,
01168 ACE_Null_Mutex> ();
01169 else if (this->supplier_collection_ == 0x112)
01170 return new TAO_ESF_Copy_On_Write<TAO_CEC_ProxyPullSupplier,
01171 TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPullSupplier>,
01172 TAO_CEC_PullSupplier_RB_Tree_Iterator,
01173 ACE_NULL_SYNCH> ();
01174 else if (this->supplier_collection_ == 0x113)
01175 return new TAO_ESF_Delayed_Changes<TAO_CEC_ProxyPullSupplier,
01176 TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPullSupplier>,
01177 TAO_CEC_PullSupplier_RB_Tree_Iterator,
01178 ACE_NULL_SYNCH> ();
01179
01180 return 0;
01181 }
|
|
|
Create and destroy a ProxyPushConsumer.
Implements TAO_CEC_Factory. Definition at line 558 of file CEC_Default_Factory.cpp.
00559 {
00560 return new TAO_CEC_ProxyPushConsumer (ec);
00561 }
|
|
|
Create and destroy a collection of TAO_CEC_ProxyPushConsumers.
Implements TAO_CEC_Factory. Definition at line 632 of file CEC_Default_Factory.cpp. References ACE_SYNCH, consumer_collection_, TAO_CEC_PushConsumer_List_Iterator, TAO_CEC_PushConsumer_RB_Tree_Iterator, and TAO_SYNCH_MUTEX.
00633 {
00634 if (this->consumer_collection_ == 0x000)
00635 return new TAO_ESF_Immediate_Changes<TAO_CEC_ProxyPushConsumer,
00636 TAO_ESF_Proxy_List<TAO_CEC_ProxyPushConsumer>,
00637 TAO_CEC_PushConsumer_List_Iterator,
00638 TAO_SYNCH_MUTEX> ();
00639 else if (this->consumer_collection_ == 0x001)
00640 return new TAO_ESF_Copy_On_Read<TAO_CEC_ProxyPushConsumer,
00641 TAO_ESF_Proxy_List<TAO_CEC_ProxyPushConsumer>,
00642 TAO_CEC_PushConsumer_List_Iterator,
00643 TAO_SYNCH_MUTEX> ();
00644 else if (this->consumer_collection_ == 0x002)
00645 return new TAO_ESF_Copy_On_Write<TAO_CEC_ProxyPushConsumer,
00646 TAO_ESF_Proxy_List<TAO_CEC_ProxyPushConsumer>,
00647 TAO_CEC_PushConsumer_List_Iterator,
00648 ACE_SYNCH> ();
00649 else if (this->consumer_collection_ == 0x003)
00650 return new TAO_ESF_Delayed_Changes<TAO_CEC_ProxyPushConsumer,
00651 TAO_ESF_Proxy_List<TAO_CEC_ProxyPushConsumer>,
00652 TAO_CEC_PushConsumer_List_Iterator,
00653 ACE_SYNCH> ();
00654 else if (this->consumer_collection_ == 0x010)
00655 return new TAO_ESF_Immediate_Changes<TAO_CEC_ProxyPushConsumer,
00656 TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPushConsumer>,
00657 TAO_CEC_PushConsumer_RB_Tree_Iterator,
00658 TAO_SYNCH_MUTEX> ();
00659 else if (this->consumer_collection_ == 0x011)
00660 return new TAO_ESF_Copy_On_Read<TAO_CEC_ProxyPushConsumer,
00661 TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPushConsumer>,
00662 TAO_CEC_PushConsumer_RB_Tree_Iterator,
00663 TAO_SYNCH_MUTEX> ();
00664 else if (this->consumer_collection_ == 0x012)
00665 return new TAO_ESF_Copy_On_Write<TAO_CEC_ProxyPushConsumer,
00666 TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPushConsumer>,
00667 TAO_CEC_PushConsumer_RB_Tree_Iterator,
00668 ACE_SYNCH> ();
00669 else if (this->consumer_collection_ == 0x013)
00670 return new TAO_ESF_Delayed_Changes<TAO_CEC_ProxyPushConsumer,
00671 TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPushConsumer>,
00672 TAO_CEC_PushConsumer_RB_Tree_Iterator,
00673 ACE_SYNCH> ();
00674 else if (this->consumer_collection_ == 0x100)
00675 return new TAO_ESF_Immediate_Changes<TAO_CEC_ProxyPushConsumer,
00676 TAO_ESF_Proxy_List<TAO_CEC_ProxyPushConsumer>,
00677 TAO_CEC_PushConsumer_List_Iterator,
00678 ACE_Null_Mutex> ();
00679 else if (this->consumer_collection_ == 0x101)
00680 return new TAO_ESF_Copy_On_Read<TAO_CEC_ProxyPushConsumer,
00681 TAO_ESF_Proxy_List<TAO_CEC_ProxyPushConsumer>,
00682 TAO_CEC_PushConsumer_List_Iterator,
00683 ACE_Null_Mutex> ();
00684 else if (this->consumer_collection_ == 0x102)
00685 return new TAO_ESF_Copy_On_Write<TAO_CEC_ProxyPushConsumer,
00686 TAO_ESF_Proxy_List<TAO_CEC_ProxyPushConsumer>,
00687 TAO_CEC_PushConsumer_List_Iterator,
00688 ACE_NULL_SYNCH> ();
00689 else if (this->consumer_collection_ == 0x103)
00690 return new TAO_ESF_Delayed_Changes<TAO_CEC_ProxyPushConsumer,
00691 TAO_ESF_Proxy_List<TAO_CEC_ProxyPushConsumer>,
00692 TAO_CEC_PushConsumer_List_Iterator,
00693 ACE_NULL_SYNCH> ();
00694 else if (this->consumer_collection_ == 0x110)
00695 return new TAO_ESF_Immediate_Changes<TAO_CEC_ProxyPushConsumer,
00696 TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPushConsumer>,
00697 TAO_CEC_PushConsumer_RB_Tree_Iterator,
00698 ACE_Null_Mutex> ();
00699 else if (this->consumer_collection_ == 0x111)
00700 return new TAO_ESF_Copy_On_Read<TAO_CEC_ProxyPushConsumer,
00701 TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPushConsumer>,
00702 TAO_CEC_PushConsumer_RB_Tree_Iterator,
00703 ACE_Null_Mutex> ();
00704 else if (this->consumer_collection_ == 0x112)
00705 return new TAO_ESF_Copy_On_Write<TAO_CEC_ProxyPushConsumer,
00706 TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPushConsumer>,
00707 TAO_CEC_PushConsumer_RB_Tree_Iterator,
00708 ACE_NULL_SYNCH> ();
00709 else if (this->consumer_collection_ == 0x113)
00710 return new TAO_ESF_Delayed_Changes<TAO_CEC_ProxyPushConsumer,
00711 TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPushConsumer>,
00712 TAO_CEC_PushConsumer_RB_Tree_Iterator,
00713 ACE_NULL_SYNCH> ();
00714
00715 return 0;
00716 }
|
|
|
Create and destroy a ProxyPushSupplier.
Implements TAO_CEC_Factory. Definition at line 526 of file CEC_Default_Factory.cpp. References TAO_CEC_ProxyPushSupplier.
00527 {
00528 return new TAO_CEC_ProxyPushSupplier (ec);
00529 }
|
|
|
|
Create and destroy the pulling strategy.
Implements TAO_CEC_Factory. Definition at line 446 of file CEC_Default_Factory.cpp. References CORBA::ORB_init(), and pulling_strategy_.
00447 {
00448 if (this->pulling_strategy_ == 0)
00449 {
00450 int argc = 0;
00451 char **argv = 0;
00452 CORBA::ORB_var orb =
00453 CORBA::ORB_init (argc, argv, this->orbid_);
00454
00455 ACE_Time_Value rate (0, this->reactive_pulling_period_);
00456 return new TAO_CEC_Reactive_Pulling_Strategy (
00457 rate, this->supplier_control_timeout_,
00458 ec, orb.in ());
00459 }
00460 return 0;
00461 }
|
|
|
Create and destroy the supplier admin implementation.
Implements TAO_CEC_Factory. Definition at line 498 of file CEC_Default_Factory.cpp.
00499 {
00500 return new TAO_CEC_SupplierAdmin (ec);
00501 }
|
|
|
Implements TAO_CEC_Factory. Definition at line 1276 of file CEC_Default_Factory.cpp. References CORBA::ORB_init(), and supplier_control_.
01277 {
01278 if (this->supplier_control_ == 0)
01279 return new TAO_CEC_SupplierControl ();
01280 else if (this->supplier_control_ == 1)
01281 {
01282 int argc = 0;
01283 char **argv = 0;
01284 CORBA::ORB_var orb =
01285 CORBA::ORB_init (argc, argv, this->orbid_);
01286
01287 ACE_Time_Value rate (0, this->supplier_control_period_);
01288 return new TAO_CEC_Reactive_SupplierControl (
01289 rate, this->supplier_control_timeout_,
01290 this->proxy_disconnect_retries_,
01291 ec, orb.in ());
01292 }
01293 return 0;
01294 }
|
|
|
Implements TAO_CEC_Factory. Definition at line 1208 of file CEC_Default_Factory.cpp. References supplier_lock_.
01209 {
01210 if (this->supplier_lock_ == 0)
01211 return new ACE_Lock_Adapter<ACE_Null_Mutex>;
01212 else if (this->supplier_lock_ == 1)
01213 return new ACE_Lock_Adapter<TAO_SYNCH_MUTEX> ();
01214 else if (this->supplier_lock_ == 2)
01215 return new ACE_Lock_Adapter<TAO_SYNCH_RECURSIVE_MUTEX> ();
01216 return 0;
01217 }
|
|
|
Implements TAO_CEC_Factory. Definition at line 484 of file CEC_Default_Factory.cpp.
00485 {
00486 delete x;
00487 }
|
|
|
Implements TAO_CEC_Factory. Definition at line 1270 of file CEC_Default_Factory.cpp.
01271 {
01272 delete x;
01273 }
|
|
|
Implements TAO_CEC_Factory. Definition at line 1202 of file CEC_Default_Factory.cpp.
01203 {
01204 delete x;
01205 }
|
|
|
Implements TAO_CEC_Factory. Definition at line 440 of file CEC_Default_Factory.cpp.
00441 {
00442 delete x;
00443 }
|
|
|
Implements TAO_CEC_Factory. Definition at line 592 of file CEC_Default_Factory.cpp.
00593 {
00594 delete x;
00595 }
|
|
|
Implements TAO_CEC_Factory. Definition at line 909 of file CEC_Default_Factory.cpp. References TAO_CEC_ProxyPullConsumer_Collection.
00910 {
00911 delete x;
00912 }
|
|
|
Implements TAO_CEC_Factory. Definition at line 552 of file CEC_Default_Factory.cpp.
00553 {
00554 delete x;
00555 }
|
|
|
Implements TAO_CEC_Factory. Definition at line 1184 of file CEC_Default_Factory.cpp. References TAO_CEC_ProxyPullSupplier_Collection.
01185 {
01186 delete x;
01187 }
|
|
|
Implements TAO_CEC_Factory. Definition at line 572 of file CEC_Default_Factory.cpp.
00573 {
00574 delete x;
00575 }
|
|
|
Implements TAO_CEC_Factory. Definition at line 808 of file CEC_Default_Factory.cpp. References TAO_CEC_ProxyPushConsumer_Collection.
00809 {
00810 delete x;
00811 }
|
|
|
Implements TAO_CEC_Factory. Definition at line 540 of file CEC_Default_Factory.cpp.
00541 {
00542 delete x;
00543 }
|
|
|
Implements TAO_CEC_Factory. Definition at line 1091 of file CEC_Default_Factory.cpp. References TAO_CEC_ProxyPushSupplier_Collection.
01092 {
01093 delete x;
01094 }
|
|
|
Implements TAO_CEC_Factory. Definition at line 464 of file CEC_Default_Factory.cpp.
00465 {
00466 delete x;
00467 }
|
|
|
Implements TAO_CEC_Factory. Definition at line 512 of file CEC_Default_Factory.cpp.
00513 {
00514 delete x;
00515 }
|
|
|
Implements TAO_CEC_Factory. Definition at line 1320 of file CEC_Default_Factory.cpp.
01321 {
01322 delete x;
01323 }
|
|
|
Implements TAO_CEC_Factory. Definition at line 1220 of file CEC_Default_Factory.cpp.
01221 {
01222 delete x;
01223 }
|
|
|
Reimplemented from ACE_Shared_Object. Definition at line 404 of file CEC_Default_Factory.cpp.
00405 {
00406 return 0;
00407 }
|
|
||||||||||||
|
Reimplemented from ACE_Shared_Object. Definition at line 102 of file CEC_Default_Factory.cpp. References ACE_Arg_Shifter, ACE_DEBUG, ACE_ERROR, ACE_TCHAR, ACE_TEXT, ACE_TEXT_ALWAYS_CHAR, ACE_THR_PRI_OTHER_DEF, ACE_OS::atoi(), consumer_collection_, consumer_control_, consumer_control_period_, consumer_control_timeout_, consumer_lock_, dispatching_, dispatching_threads_, dispatching_threads_flags_, dispatching_threads_priority_, ACE_OS::free(), LM_DEBUG, LM_ERROR, orbid_dupped_, parse_collection_arg(), proxy_disconnect_retries_, reactive_pulling_period_, ACE_OS::strcasecmp(), ACE_OS::strdup(), ACE_OS::strncmp(), ACE_OS::strtoul(), supplier_collection_, supplier_control_, supplier_control_period_, supplier_control_timeout_, supplier_lock_, and ACE_Time_Value::usec().
00103 {
00104 ACE_Arg_Shifter arg_shifter (argc, argv);
00105
00106 this->dispatching_threads_flags_ =
00107 THR_SCHED_DEFAULT|THR_BOUND|THR_NEW_LWP;
00108 this->dispatching_threads_priority_ =
00109 ACE_THR_PRI_OTHER_DEF;
00110
00111 while (arg_shifter.is_anything_left ())
00112 {
00113 const ACE_TCHAR *arg = arg_shifter.get_current ();
00114
00115 if (ACE_OS::strcasecmp (arg, ACE_TEXT("-CECDispatching")) == 0)
00116 {
00117 arg_shifter.consume_arg ();
00118
00119 if (arg_shifter.is_parameter_next ())
00120 {
00121 const ACE_TCHAR* opt = arg_shifter.get_current ();
00122 if (ACE_OS::strcasecmp (opt, ACE_TEXT("reactive")) == 0)
00123 {
00124 this->dispatching_ = 0;
00125 }
00126 else if (ACE_OS::strcasecmp (opt, ACE_TEXT("mt")) == 0)
00127 {
00128 this->dispatching_ = 1;
00129 }
00130 else
00131 {
00132 ACE_ERROR ((LM_ERROR,
00133 "CEC_Default_Factory - "
00134 "unsupported dispatching <%s>\n",
00135 opt));
00136 }
00137 arg_shifter.consume_arg ();
00138 }
00139 }
00140
00141 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-CECDispatchingThreads")) == 0)
00142 {
00143 arg_shifter.consume_arg ();
00144
00145 if (arg_shifter.is_parameter_next ())
00146 {
00147 const ACE_TCHAR* opt = arg_shifter.get_current ();
00148 this->dispatching_threads_ = ACE_OS::atoi (opt);
00149 arg_shifter.consume_arg ();
00150 }
00151 }
00152
00153 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-CECProxyConsumerCollection")) == 0)
00154 {
00155 arg_shifter.consume_arg ();
00156
00157 if (arg_shifter.is_parameter_next ())
00158 {
00159 const ACE_TCHAR *current_arg = arg_shifter.get_current ();
00160 ACE_TCHAR *opt = ACE_OS::strdup (current_arg);
00161 this->consumer_collection_ = this->parse_collection_arg (opt);
00162 ACE_OS::free (opt);
00163 arg_shifter.consume_arg ();
00164 }
00165 }
00166
00167 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-CECProxySupplierCollection")) == 0)
00168 {
00169 arg_shifter.consume_arg ();
00170
00171 if (arg_shifter.is_parameter_next ())
00172 {
00173 const ACE_TCHAR *current_arg = arg_shifter.get_current();
00174 ACE_TCHAR* opt = ACE_OS::strdup(current_arg);
00175 this->supplier_collection_ =
00176 this->parse_collection_arg (opt);
00177 ACE_OS::free(opt);
00178 arg_shifter.consume_arg ();
00179 }
00180 }
00181
00182 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-CECProxyConsumerLock")) == 0)
00183 {
00184 arg_shifter.consume_arg ();
00185
00186 if (arg_shifter.is_parameter_next ())
00187 {
00188 const ACE_TCHAR* opt = arg_shifter.get_current ();
00189 if (ACE_OS::strcasecmp (opt, ACE_TEXT("null")) == 0)
00190 {
00191 this->consumer_lock_ = 0;
00192 }
00193 else if (ACE_OS::strcasecmp (opt, ACE_TEXT("thread")) == 0)
00194 {
00195 this->consumer_lock_ = 1;
00196 }
00197 else if (ACE_OS::strcasecmp (opt, ACE_TEXT("recursive")) == 0)
00198 {
00199 this->consumer_lock_ = 2;
00200 }
00201 else
00202 {
00203 ACE_ERROR ((LM_ERROR,
00204 "CEC_Default_Factory - "
00205 "unsupported consumer lock <%s>\n",
00206 opt));
00207 }
00208 arg_shifter.consume_arg ();
00209 }
00210 }
00211
00212 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-CECProxySupplierLock")) == 0)
00213 {
00214 arg_shifter.consume_arg ();
00215
00216 if (arg_shifter.is_parameter_next ())
00217 {
00218 const ACE_TCHAR* opt = arg_shifter.get_current ();
00219 if (ACE_OS::strcasecmp (opt, ACE_TEXT("null")) == 0)
00220 {
00221 this->supplier_lock_ = 0;
00222 }
00223 else if (ACE_OS::strcasecmp (opt, ACE_TEXT("thread")) == 0)
00224 {
00225 this->supplier_lock_ = 1;
00226 }
00227 else if (ACE_OS::strcasecmp (opt, ACE_TEXT("recursive")) == 0)
00228 {
00229 this->supplier_lock_ = 2;
00230 }
00231 else
00232 {
00233 ACE_ERROR ((LM_ERROR,
00234 "CEC_Default_Factory - "
00235 "unsupported supplier lock <%s>\n",
00236 opt));
00237 }
00238 arg_shifter.consume_arg ();
00239 }
00240 }
00241
00242 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-CECReactivePullingPeriod")) == 0)
00243 {
00244 arg_shifter.consume_arg ();
00245
00246 if (arg_shifter.is_parameter_next ())
00247 {
00248 const ACE_TCHAR* opt = arg_shifter.get_current ();
00249 this->reactive_pulling_period_ = ACE_OS::atoi (opt);
00250 arg_shifter.consume_arg ();
00251 }
00252 }
00253
00254 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-CECUseORBId")) == 0)
00255 {
00256 arg_shifter.consume_arg ();
00257
00258 if (arg_shifter.is_parameter_next ())
00259 {
00260 // Copy argument for later use
00261 this->orbid_ = ACE_OS::strdup(ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ()));
00262 orbid_dupped_ = 1;
00263 arg_shifter.consume_arg ();
00264 }
00265 }
00266
00267 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-CECConsumerControl")) == 0)
00268 {
00269 arg_shifter.consume_arg ();
00270
00271 if (arg_shifter.is_parameter_next ())
00272 {
00273 const ACE_TCHAR* opt = arg_shifter.get_current ();
00274 if (ACE_OS::strcasecmp (opt, ACE_TEXT("null")) == 0)
00275 {
00276 this->consumer_control_ = 0;
00277 }
00278 else if (ACE_OS::strcasecmp (opt, ACE_TEXT("reactive")) == 0)
00279 {
00280 this->consumer_control_ = 1;
00281 }
00282 else
00283 {
00284 ACE_ERROR ((LM_ERROR,
00285 "CEC_Default_Factory - "
00286 "unsupported consumer control <%s>\n",
00287 opt));
00288 }
00289 arg_shifter.consume_arg ();
00290 }
00291 }
00292
00293 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-CECSupplierControl")) == 0)
00294 {
00295 arg_shifter.consume_arg ();
00296
00297 if (arg_shifter.is_parameter_next ())
00298 {
00299 const ACE_TCHAR* opt = arg_shifter.get_current ();
00300 if (ACE_OS::strcasecmp (opt, ACE_TEXT("null")) == 0)
00301 {
00302 this->supplier_control_ = 0;
00303 }
00304 else if (ACE_OS::strcasecmp (opt, ACE_TEXT("reactive")) == 0)
00305 {
00306 this->supplier_control_ = 1;
00307 }
00308 else
00309 {
00310 ACE_ERROR ((LM_ERROR,
00311 "CEC_Default_Factory - "
00312 "unsupported supplier control <%s>\n",
00313 opt));
00314 }
00315 arg_shifter.consume_arg ();
00316 }
00317 }
00318
00319 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-CECConsumerControlPeriod")) == 0)
00320 {
00321 arg_shifter.consume_arg ();
00322
00323 if (arg_shifter.is_parameter_next ())
00324 {
00325 const ACE_TCHAR* opt = arg_shifter.get_current ();
00326 this->consumer_control_period_ = ACE_OS::atoi (opt);
00327 arg_shifter.consume_arg ();
00328 }
00329 }
00330
00331 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-CECSupplierControlPeriod")) == 0)
00332 {
00333 arg_shifter.consume_arg ();
00334
00335 if (arg_shifter.is_parameter_next ())
00336 {
00337 const ACE_TCHAR* opt = arg_shifter.get_current ();
00338 this->supplier_control_period_ = ACE_OS::atoi (opt);
00339 arg_shifter.consume_arg ();
00340 }
00341 }
00342
00343 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-CECConsumerControlTimeout")) == 0 ||
00344 ACE_OS::strcasecmp (arg, ACE_TEXT("-CECConsumerControlRoundtripTimeout")) == 0)
00345 {
00346 arg_shifter.consume_arg ();
00347
00348 if (arg_shifter.is_parameter_next ())
00349 {
00350 const ACE_TCHAR* opt = arg_shifter.get_current ();
00351 unsigned long timeout_ = ACE_OS::strtoul(opt, 0, 10);
00352 this->consumer_control_timeout_.usec(timeout_);
00353 arg_shifter.consume_arg ();
00354 }
00355 }
00356
00357 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-CECSupplierControlTimeout")) == 0 ||
00358 ACE_OS::strcasecmp (arg, ACE_TEXT("-CECSupplierControlRoundtripTimeout")) == 0)
00359 {
00360 arg_shifter.consume_arg ();
00361
00362 if (arg_shifter.is_parameter_next ())
00363 {
00364 const ACE_TCHAR* opt = arg_shifter.get_current ();
00365 unsigned long timeout_ = ACE_OS::strtoul(opt, 0, 10);
00366 this->supplier_control_timeout_.usec(timeout_);
00367 arg_shifter.consume_arg ();
00368 }
00369 }
00370
00371 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-CECProxyDisconnectRetries")) == 0)
00372 {
00373 arg_shifter.consume_arg ();
00374
00375 if (arg_shifter.is_parameter_next ())
00376 {
00377 const ACE_TCHAR* opt = arg_shifter.get_current ();
00378 this->proxy_disconnect_retries_ = ACE_OS::atoi (opt);
00379 arg_shifter.consume_arg ();
00380 }
00381 }
00382
00383 else if (ACE_OS::strncmp (arg, ACE_TEXT("-CEC"), 3) == 0)
00384 {
00385 arg_shifter.consume_arg ();
00386 ACE_ERROR ((LM_ERROR,
00387 "CEC_Default_Factory - "
00388 "unknown option <%s>\n",
00389 arg));
00390 }
00391 else
00392 {
00393 arg_shifter.consume_arg ();
00394 ACE_DEBUG ((LM_DEBUG,
00395 "CEC_Default_Factory - "
00396 "ignoring option <%s>\n",
00397 arg));
00398 }
00399 }
00400 return 0;
00401 }
|
|
|
Helper function to register the default factory into the service configurator. Definition at line 56 of file CEC_Default_Factory.cpp. References ACE_Service_Gestalt::insert(), and ACE_Service_Config::static_svcs().
00057 {
00058 return
00059 ACE_Service_Config::static_svcs ()->insert (
00060 &ace_svc_desc_TAO_CEC_Default_Factory
00061 );
00062 }
|
|
|
Parse an argument to set the type of collections used.
Definition at line 65 of file CEC_Default_Factory.cpp. References ACE_ERROR, ACE_TCHAR, ACE_TEXT, LM_ERROR, ACE_OS::strcasecmp(), and ACE_OS::strtok_r(). Referenced by init().
00066 {
00067 int collection_type = 0;
00068 int synch_type = 0;
00069 int iteration_type = 0;
00070
00071 ACE_TCHAR* aux = 0;
00072 for (ACE_TCHAR* arg = ACE_OS::strtok_r (opt, ACE_TEXT(":"), &aux);
00073 arg != 0;
00074 arg = ACE_OS::strtok_r (0, ACE_TEXT(":"), &aux))
00075 {
00076 if (ACE_OS::strcasecmp (arg, ACE_TEXT("mt")) == 0)
00077 synch_type = 0;
00078 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("st")) == 0)
00079 synch_type = 1;
00080 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("list")) == 0)
00081 collection_type = 0;
00082 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("rb_tree")) == 0)
00083 collection_type = 1;
00084 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("immediate")) == 0)
00085 iteration_type = 0;
00086 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("copy_on_read")) == 0)
00087 iteration_type = 1;
00088 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("copy_on_write")) == 0)
00089 iteration_type = 2;
00090 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("delayed")) == 0)
00091 iteration_type = 3;
00092 else
00093 ACE_ERROR ((LM_ERROR,
00094 "CEC_Default_Factory - "
00095 "unknown collection modifier <%s>\n",
00096 arg));
00097 }
00098 return (synch_type << 8) |(collection_type << 4) | iteration_type;
00099 }
|
|
|
Definition at line 172 of file CEC_Default_Factory.h. Referenced by create_proxy_pull_consumer_collection(), create_proxy_push_consumer_collection(), and init(). |
|
|
The consumer and supplier control policies.
Definition at line 195 of file CEC_Default_Factory.h. Referenced by create_consumer_control(), and init(). |
|
|
The consumer and supplier control periods in usecs.
Definition at line 199 of file CEC_Default_Factory.h. Referenced by init(). |
|
|
The consumer and supplier control timeout in usecs.
Definition at line 203 of file CEC_Default_Factory.h. Referenced by init(). |
|
|
Definition at line 174 of file CEC_Default_Factory.h. Referenced by create_consumer_lock(), and init(). |
|
|
Several flags to control the kind of object created.
Definition at line 170 of file CEC_Default_Factory.h. Referenced by create_dispatching(), and init(). |
|
|
The MT dispatching priority has several arguments that could be controlled here... Definition at line 179 of file CEC_Default_Factory.h. Referenced by init(). |
|
|
Definition at line 180 of file CEC_Default_Factory.h. Referenced by init(). |
|
|
Definition at line 182 of file CEC_Default_Factory.h. |
|
|
Definition at line 181 of file CEC_Default_Factory.h. Referenced by init(). |
|
|
Use this ORB to locate global resources.
Definition at line 189 of file CEC_Default_Factory.h. |
|
|
Indicate ORB ID has been duplicated (memory allocated).
Definition at line 192 of file CEC_Default_Factory.h. Referenced by init(), and ~TAO_CEC_Default_Factory(). |
|
|
The number of retries before disconnecting a proxy.
Definition at line 207 of file CEC_Default_Factory.h. Referenced by init(). |
|
|
Definition at line 171 of file CEC_Default_Factory.h. Referenced by create_pulling_strategy(). |
|
|
How often (in microseconds) are the pull suppliers polled by the reactive pulling strategy. Definition at line 186 of file CEC_Default_Factory.h. Referenced by init(). |
|
|
Definition at line 173 of file CEC_Default_Factory.h. Referenced by create_proxy_pull_supplier_collection(), create_proxy_push_supplier_collection(), and init(). |
|
|
Definition at line 196 of file CEC_Default_Factory.h. Referenced by create_supplier_control(), and init(). |
|
|
Definition at line 200 of file CEC_Default_Factory.h. Referenced by init(). |
|
|
Definition at line 204 of file CEC_Default_Factory.h. Referenced by init(). |
|
|
Definition at line 175 of file CEC_Default_Factory.h. Referenced by create_supplier_lock(), and init(). |
1.3.6