TAO_CEC_Default_Factory Class Reference

A generic factory for EC experimentation. More...

#include <CEC_Default_Factory.h>

Inheritance diagram for TAO_CEC_Default_Factory:

Inheritance graph
[legend]
Collaboration diagram for TAO_CEC_Default_Factory:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_CEC_Default_Factory (void)
 Constructor.

virtual ~TAO_CEC_Default_Factory (void)
 destructor...

virtual int init (int argc, ACE_TCHAR *argv[])
virtual int fini (void)
virtual TAO_CEC_Dispatchingcreate_dispatching (TAO_CEC_EventChannel *)
 Create and destroy the dispatching module.

virtual void destroy_dispatching (TAO_CEC_Dispatching *)
virtual TAO_CEC_Pulling_Strategycreate_pulling_strategy (TAO_CEC_EventChannel *)
 Create and destroy the pulling strategy.

virtual void destroy_pulling_strategy (TAO_CEC_Pulling_Strategy *)
virtual TAO_CEC_ConsumerAdmincreate_consumer_admin (TAO_CEC_EventChannel *)
 Create and destroy the consumer admin implementation.

virtual void destroy_consumer_admin (TAO_CEC_ConsumerAdmin *)
virtual TAO_CEC_SupplierAdmincreate_supplier_admin (TAO_CEC_EventChannel *)
 Create and destroy the supplier admin implementation.

virtual void destroy_supplier_admin (TAO_CEC_SupplierAdmin *)
virtual TAO_CEC_ProxyPushSuppliercreate_proxy_push_supplier (TAO_CEC_EventChannel *)
 Create and destroy a ProxyPushSupplier.

virtual void destroy_proxy_push_supplier (TAO_CEC_ProxyPushSupplier *)
virtual TAO_CEC_ProxyPullSuppliercreate_proxy_pull_supplier (TAO_CEC_EventChannel *)
 Create and destroy a ProxyPullSupplier.

virtual void destroy_proxy_pull_supplier (TAO_CEC_ProxyPullSupplier *)
virtual TAO_CEC_ProxyPushConsumercreate_proxy_push_consumer (TAO_CEC_EventChannel *)
 Create and destroy a ProxyPushConsumer.

virtual void destroy_proxy_push_consumer (TAO_CEC_ProxyPushConsumer *)
virtual TAO_CEC_ProxyPullConsumercreate_proxy_pull_consumer (TAO_CEC_EventChannel *)
 Create and destroy a ProxyPullConsumer.

virtual void destroy_proxy_pull_consumer (TAO_CEC_ProxyPullConsumer *)
virtual TAO_CEC_ProxyPushConsumer_Collectioncreate_proxy_push_consumer_collection (TAO_CEC_EventChannel *)
 Create and destroy a collection of TAO_CEC_ProxyPushConsumers.

virtual void destroy_proxy_push_consumer_collection (TAO_CEC_ProxyPushConsumer_Collection *)
virtual TAO_CEC_ProxyPullConsumer_Collectioncreate_proxy_pull_consumer_collection (TAO_CEC_EventChannel *)
 Create and destroy a collection of TAO_CEC_ProxyPullConsumers.

virtual void destroy_proxy_pull_consumer_collection (TAO_CEC_ProxyPullConsumer_Collection *)
virtual TAO_CEC_ProxyPushSupplier_Collectioncreate_proxy_push_supplier_collection (TAO_CEC_EventChannel *)
 Create and destroy a collection of TAO_CEC_ProxyPushSuppliers.

virtual void destroy_proxy_push_supplier_collection (TAO_CEC_ProxyPushSupplier_Collection *)
virtual TAO_CEC_ProxyPullSupplier_Collectioncreate_proxy_pull_supplier_collection (TAO_CEC_EventChannel *)
 Create and destroy a collection of TAO_CEC_ProxyPullSuppliers.

virtual void destroy_proxy_pull_supplier_collection (TAO_CEC_ProxyPullSupplier_Collection *)
virtual ACE_Lockcreate_consumer_lock (void)
virtual void destroy_consumer_lock (ACE_Lock *)
virtual ACE_Lockcreate_supplier_lock (void)
virtual void destroy_supplier_lock (ACE_Lock *)
virtual TAO_CEC_ConsumerControlcreate_consumer_control (TAO_CEC_EventChannel *)
virtual void destroy_consumer_control (TAO_CEC_ConsumerControl *)
virtual TAO_CEC_SupplierControlcreate_supplier_control (TAO_CEC_EventChannel *)
virtual void destroy_supplier_control (TAO_CEC_SupplierControl *)

Static Public Member Functions

int init_svcs (void)

Private Member Functions

int parse_collection_arg (ACE_TCHAR *opt)
 Parse an argument to set the type of collections used.


Private Attributes

int dispatching_
 Several flags to control the kind of object created.

int pulling_strategy_
int consumer_collection_
int supplier_collection_
int consumer_lock_
int supplier_lock_
int dispatching_threads_
int dispatching_threads_flags_
int dispatching_threads_priority_
int dispatching_threads_force_active_
int reactive_pulling_period_
char * orbid_
 Use this ORB to locate global resources.

int orbid_dupped_
 Indicate ORB ID has been duplicated (memory allocated).

int consumer_control_
 The consumer and supplier control policies.

int supplier_control_
int consumer_control_period_
 The consumer and supplier control periods in usecs.

int supplier_control_period_
ACE_Time_Value consumer_control_timeout_
 The consumer and supplier control timeout in usecs.

ACE_Time_Value supplier_control_timeout_
unsigned int proxy_disconnect_retries_
 The number of retries before disconnecting a proxy.


Detailed Description

A generic factory for EC experimentation.

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.


Constructor & Destructor Documentation

TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE TAO_CEC_Default_Factory::TAO_CEC_Default_Factory void   ) 
 

Constructor.

Definition at line 8 of file CEC_Default_Factory.i.

References TAO_CEC_DEFAULT_CONSUMER_COLLECTION, TAO_CEC_DEFAULT_CONSUMER_CONTROL, TAO_CEC_DEFAULT_CONSUMER_CONTROL_PERIOD, TAO_CEC_DEFAULT_CONSUMER_CONTROL_TIMEOUT, TAO_CEC_DEFAULT_CONSUMER_LOCK, TAO_CEC_DEFAULT_DISPATCHING, TAO_CEC_DEFAULT_DISPATCHING_THREADS, TAO_CEC_DEFAULT_DISPATCHING_THREADS_FLAGS, TAO_CEC_DEFAULT_DISPATCHING_THREADS_FORCE_ACTIVE, TAO_CEC_DEFAULT_DISPATCHING_THREADS_PRIORITY, TAO_CEC_DEFAULT_ORB_ID, TAO_CEC_DEFAULT_PROXY_DISCONNECT_RETRIES, TAO_CEC_DEFAULT_PULLING_STRATEGY, TAO_CEC_DEFAULT_REACTIVE_PULLING_PERIOD, TAO_CEC_DEFAULT_SUPPLIER_COLLECTION, TAO_CEC_DEFAULT_SUPPLIER_CONTROL, TAO_CEC_DEFAULT_SUPPLIER_CONTROL_PERIOD, TAO_CEC_DEFAULT_SUPPLIER_CONTROL_TIMEOUT, and TAO_CEC_DEFAULT_SUPPLIER_LOCK.

00009   :  dispatching_ (TAO_CEC_DEFAULT_DISPATCHING),
00010      pulling_strategy_ (TAO_CEC_DEFAULT_PULLING_STRATEGY),
00011      consumer_collection_ (TAO_CEC_DEFAULT_CONSUMER_COLLECTION),
00012      supplier_collection_ (TAO_CEC_DEFAULT_SUPPLIER_COLLECTION),
00013      consumer_lock_ (TAO_CEC_DEFAULT_CONSUMER_LOCK),
00014      supplier_lock_ (TAO_CEC_DEFAULT_SUPPLIER_LOCK),
00015      dispatching_threads_ (TAO_CEC_DEFAULT_DISPATCHING_THREADS),
00016      dispatching_threads_flags_ (TAO_CEC_DEFAULT_DISPATCHING_THREADS_FLAGS),
00017      dispatching_threads_priority_ (TAO_CEC_DEFAULT_DISPATCHING_THREADS_PRIORITY),
00018      dispatching_threads_force_active_ (TAO_CEC_DEFAULT_DISPATCHING_THREADS_FORCE_ACTIVE),
00019      reactive_pulling_period_ (TAO_CEC_DEFAULT_REACTIVE_PULLING_PERIOD),
00020      orbid_ ((char*)TAO_CEC_DEFAULT_ORB_ID),
00021      orbid_dupped_(0),
00022      consumer_control_ (TAO_CEC_DEFAULT_CONSUMER_CONTROL),
00023      supplier_control_ (TAO_CEC_DEFAULT_SUPPLIER_CONTROL),
00024      consumer_control_period_ (TAO_CEC_DEFAULT_CONSUMER_CONTROL_PERIOD),
00025      supplier_control_period_ (TAO_CEC_DEFAULT_SUPPLIER_CONTROL_PERIOD),
00026      consumer_control_timeout_ (0, TAO_CEC_DEFAULT_CONSUMER_CONTROL_TIMEOUT),
00027      supplier_control_timeout_ (0, TAO_CEC_DEFAULT_SUPPLIER_CONTROL_TIMEOUT),
00028      proxy_disconnect_retries_ (TAO_CEC_DEFAULT_PROXY_DISCONNECT_RETRIES)
00029 {
00030 }

TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_CEC_Default_Factory::~TAO_CEC_Default_Factory void   )  [virtual]
 

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 }


Member Function Documentation

TAO_CEC_ConsumerAdmin * TAO_CEC_Default_Factory::create_consumer_admin TAO_CEC_EventChannel  )  [virtual]
 

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 }

TAO_CEC_ConsumerControl * TAO_CEC_Default_Factory::create_consumer_control TAO_CEC_EventChannel  )  [virtual]
 

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 }

ACE_Lock * TAO_CEC_Default_Factory::create_consumer_lock void   )  [virtual]
 

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 }

TAO_CEC_Dispatching * TAO_CEC_Default_Factory::create_dispatching TAO_CEC_EventChannel  )  [virtual]
 

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 }

TAO_CEC_ProxyPullConsumer * TAO_CEC_Default_Factory::create_proxy_pull_consumer TAO_CEC_EventChannel  )  [virtual]
 

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 }

TAO_CEC_ProxyPullConsumer_Collection * TAO_CEC_Default_Factory::create_proxy_pull_consumer_collection TAO_CEC_EventChannel  )  [virtual]
 

Create and destroy a collection of TAO_CEC_ProxyPullConsumers.

Implements TAO_CEC_Factory.

Definition at line 822 of file CEC_Default_Factory.cpp.

References ACE_SYNCH, consumer_collection_, TAO_CEC_ProxyPullConsumer, TAO_CEC_PullConsumer_List_Iterator, TAO_CEC_PullConsumer_RB_Tree_Iterator, and TAO_SYNCH_MUTEX.

00823 {
00824   if (this->consumer_collection_ == 0x000)
00825     return new TAO_ESF_Immediate_Changes<TAO_CEC_ProxyPullConsumer,
00826       TAO_ESF_Proxy_List<TAO_CEC_ProxyPullConsumer>,
00827       TAO_CEC_PullConsumer_List_Iterator,
00828       TAO_SYNCH_MUTEX> ();
00829   else if (this->consumer_collection_ == 0x001)
00830     return new TAO_ESF_Copy_On_Read<TAO_CEC_ProxyPullConsumer,
00831       TAO_ESF_Proxy_List<TAO_CEC_ProxyPullConsumer>,
00832       TAO_CEC_PullConsumer_List_Iterator,
00833       TAO_SYNCH_MUTEX> ();
00834   else if (this->consumer_collection_ == 0x002)
00835     return new TAO_ESF_Copy_On_Write<TAO_CEC_ProxyPullConsumer,
00836       TAO_ESF_Proxy_List<TAO_CEC_ProxyPullConsumer>,
00837       TAO_CEC_PullConsumer_List_Iterator,
00838       ACE_SYNCH> ();
00839   else if (this->consumer_collection_ == 0x003)
00840     return new TAO_ESF_Delayed_Changes<TAO_CEC_ProxyPullConsumer,
00841       TAO_ESF_Proxy_List<TAO_CEC_ProxyPullConsumer>,
00842       TAO_CEC_PullConsumer_List_Iterator,
00843       ACE_SYNCH> ();
00844   else if (this->consumer_collection_ == 0x010)
00845     return new TAO_ESF_Immediate_Changes<TAO_CEC_ProxyPullConsumer,
00846       TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPullConsumer>,
00847       TAO_CEC_PullConsumer_RB_Tree_Iterator,
00848       TAO_SYNCH_MUTEX> ();
00849   else if (this->consumer_collection_ == 0x011)
00850     return new TAO_ESF_Copy_On_Read<TAO_CEC_ProxyPullConsumer,
00851       TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPullConsumer>,
00852       TAO_CEC_PullConsumer_RB_Tree_Iterator,
00853       TAO_SYNCH_MUTEX> ();
00854   else if (this->consumer_collection_ == 0x012)
00855     return new TAO_ESF_Copy_On_Write<TAO_CEC_ProxyPullConsumer,
00856       TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPullConsumer>,
00857       TAO_CEC_PullConsumer_RB_Tree_Iterator,
00858       ACE_SYNCH> ();
00859   else if (this->consumer_collection_ == 0x013)
00860     return new TAO_ESF_Delayed_Changes<TAO_CEC_ProxyPullConsumer,
00861       TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPullConsumer>,
00862       TAO_CEC_PullConsumer_RB_Tree_Iterator,
00863       ACE_SYNCH> ();
00864   else if (this->consumer_collection_ == 0x100)
00865     return new TAO_ESF_Immediate_Changes<TAO_CEC_ProxyPullConsumer,
00866       TAO_ESF_Proxy_List<TAO_CEC_ProxyPullConsumer>,
00867       TAO_CEC_PullConsumer_List_Iterator,
00868       ACE_Null_Mutex> ();
00869   else if (this->consumer_collection_ == 0x101)
00870     return new TAO_ESF_Copy_On_Read<TAO_CEC_ProxyPullConsumer,
00871       TAO_ESF_Proxy_List<TAO_CEC_ProxyPullConsumer>,
00872       TAO_CEC_PullConsumer_List_Iterator,
00873       ACE_Null_Mutex> ();
00874   else if (this->consumer_collection_ == 0x102)
00875     return new TAO_ESF_Copy_On_Write<TAO_CEC_ProxyPullConsumer,
00876       TAO_ESF_Proxy_List<TAO_CEC_ProxyPullConsumer>,
00877       TAO_CEC_PullConsumer_List_Iterator,
00878       ACE_NULL_SYNCH> ();
00879   else if (this->consumer_collection_ == 0x103)
00880     return new TAO_ESF_Delayed_Changes<TAO_CEC_ProxyPullConsumer,
00881       TAO_ESF_Proxy_List<TAO_CEC_ProxyPullConsumer>,
00882       TAO_CEC_PullConsumer_List_Iterator,
00883       ACE_NULL_SYNCH> ();
00884   else if (this->consumer_collection_ == 0x110)
00885     return new TAO_ESF_Immediate_Changes<TAO_CEC_ProxyPullConsumer,
00886       TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPullConsumer>,
00887       TAO_CEC_PullConsumer_RB_Tree_Iterator,
00888       ACE_Null_Mutex> ();
00889   else if (this->consumer_collection_ == 0x111)
00890     return new TAO_ESF_Copy_On_Read<TAO_CEC_ProxyPullConsumer,
00891       TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPullConsumer>,
00892       TAO_CEC_PullConsumer_RB_Tree_Iterator,
00893       ACE_Null_Mutex> ();
00894   else if (this->consumer_collection_ == 0x112)
00895     return new TAO_ESF_Copy_On_Write<TAO_CEC_ProxyPullConsumer,
00896       TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPullConsumer>,
00897       TAO_CEC_PullConsumer_RB_Tree_Iterator,
00898       ACE_NULL_SYNCH> ();
00899   else if (this->consumer_collection_ == 0x113)
00900     return new TAO_ESF_Delayed_Changes<TAO_CEC_ProxyPullConsumer,
00901       TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPullConsumer>,
00902       TAO_CEC_PullConsumer_RB_Tree_Iterator,
00903       ACE_NULL_SYNCH> ();
00904 
00905   return 0;
00906 }

TAO_CEC_ProxyPullSupplier * TAO_CEC_Default_Factory::create_proxy_pull_supplier TAO_CEC_EventChannel  )  [virtual]
 

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 }

TAO_CEC_ProxyPullSupplier_Collection * TAO_CEC_Default_Factory::create_proxy_pull_supplier_collection TAO_CEC_EventChannel  )  [virtual]
 

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 }

TAO_CEC_ProxyPushConsumer * TAO_CEC_Default_Factory::create_proxy_push_consumer TAO_CEC_EventChannel  )  [virtual]
 

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 }

TAO_CEC_ProxyPushConsumer_Collection * TAO_CEC_Default_Factory::create_proxy_push_consumer_collection TAO_CEC_EventChannel  )  [virtual]
 

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 }

TAO_CEC_ProxyPushSupplier * TAO_CEC_Default_Factory::create_proxy_push_supplier TAO_CEC_EventChannel  )  [virtual]
 

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 }

TAO_CEC_ProxyPushSupplier_Collection * TAO_CEC_Default_Factory::create_proxy_push_supplier_collection TAO_CEC_EventChannel  )  [virtual]
 

Create and destroy a collection of TAO_CEC_ProxyPushSuppliers.

Implements TAO_CEC_Factory.

Definition at line 915 of file CEC_Default_Factory.cpp.

References ACE_SYNCH, supplier_collection_, TAO_CEC_ProxyPushSupplier, TAO_CEC_PushSupplier_List_Iterator, TAO_CEC_PushSupplier_RB_Tree_Iterator, and TAO_SYNCH_MUTEX.

00916 {
00917   if (this->supplier_collection_ == 0x000)
00918     return new TAO_ESF_Immediate_Changes<TAO_CEC_ProxyPushSupplier,
00919       TAO_ESF_Proxy_List<TAO_CEC_ProxyPushSupplier>,
00920       TAO_CEC_PushSupplier_List_Iterator,
00921       TAO_SYNCH_MUTEX> ();
00922   else if (this->supplier_collection_ == 0x001)
00923     return new TAO_ESF_Copy_On_Read<TAO_CEC_ProxyPushSupplier,
00924       TAO_ESF_Proxy_List<TAO_CEC_ProxyPushSupplier>,
00925       TAO_CEC_PushSupplier_List_Iterator,
00926       TAO_SYNCH_MUTEX> ();
00927   else if (this->supplier_collection_ == 0x002)
00928     return new TAO_ESF_Copy_On_Write<TAO_CEC_ProxyPushSupplier,
00929       TAO_ESF_Proxy_List<TAO_CEC_ProxyPushSupplier>,
00930       TAO_CEC_PushSupplier_List_Iterator,
00931       ACE_SYNCH> ();
00932   else if (this->supplier_collection_ == 0x003)
00933     return new TAO_ESF_Delayed_Changes<TAO_CEC_ProxyPushSupplier,
00934       TAO_ESF_Proxy_List<TAO_CEC_ProxyPushSupplier>,
00935       TAO_CEC_PushSupplier_List_Iterator,
00936       ACE_SYNCH> ();
00937   else if (this->supplier_collection_ == 0x010)
00938     return new TAO_ESF_Immediate_Changes<TAO_CEC_ProxyPushSupplier,
00939       TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPushSupplier>,
00940       TAO_CEC_PushSupplier_RB_Tree_Iterator,
00941       TAO_SYNCH_MUTEX> ();
00942   else if (this->supplier_collection_ == 0x011)
00943     return new TAO_ESF_Copy_On_Read<TAO_CEC_ProxyPushSupplier,
00944       TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPushSupplier>,
00945       TAO_CEC_PushSupplier_RB_Tree_Iterator,
00946       TAO_SYNCH_MUTEX> ();
00947   else if (this->supplier_collection_ == 0x012)
00948     return new TAO_ESF_Copy_On_Write<TAO_CEC_ProxyPushSupplier,
00949       TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPushSupplier>,
00950       TAO_CEC_PushSupplier_RB_Tree_Iterator,
00951       ACE_SYNCH> ();
00952   else if (this->supplier_collection_ == 0x013)
00953     return new TAO_ESF_Delayed_Changes<TAO_CEC_ProxyPushSupplier,
00954       TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPushSupplier>,
00955       TAO_CEC_PushSupplier_RB_Tree_Iterator,
00956       ACE_SYNCH> ();
00957   else if (this->supplier_collection_ == 0x100)
00958     return new TAO_ESF_Immediate_Changes<TAO_CEC_ProxyPushSupplier,
00959       TAO_ESF_Proxy_List<TAO_CEC_ProxyPushSupplier>,
00960       TAO_CEC_PushSupplier_List_Iterator,
00961       ACE_Null_Mutex> ();
00962   else if (this->supplier_collection_ == 0x101)
00963     return new TAO_ESF_Copy_On_Read<TAO_CEC_ProxyPushSupplier,
00964       TAO_ESF_Proxy_List<TAO_CEC_ProxyPushSupplier>,
00965       TAO_CEC_PushSupplier_List_Iterator,
00966       ACE_Null_Mutex> ();
00967   else if (this->supplier_collection_ == 0x102)
00968     return new TAO_ESF_Copy_On_Write<TAO_CEC_ProxyPushSupplier,
00969       TAO_ESF_Proxy_List<TAO_CEC_ProxyPushSupplier>,
00970       TAO_CEC_PushSupplier_List_Iterator,
00971       ACE_NULL_SYNCH> ();
00972   else if (this->supplier_collection_ == 0x103)
00973     return new TAO_ESF_Delayed_Changes<TAO_CEC_ProxyPushSupplier,
00974       TAO_ESF_Proxy_List<TAO_CEC_ProxyPushSupplier>,
00975       TAO_CEC_PushSupplier_List_Iterator,
00976       ACE_NULL_SYNCH> ();
00977   else if (this->supplier_collection_ == 0x110)
00978     return new TAO_ESF_Immediate_Changes<TAO_CEC_ProxyPushSupplier,
00979       TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPushSupplier>,
00980       TAO_CEC_PushSupplier_RB_Tree_Iterator,
00981       ACE_Null_Mutex> ();
00982   else if (this->supplier_collection_ == 0x111)
00983     return new TAO_ESF_Copy_On_Read<TAO_CEC_ProxyPushSupplier,
00984       TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPushSupplier>,
00985       TAO_CEC_PushSupplier_RB_Tree_Iterator,
00986       ACE_Null_Mutex> ();
00987   else if (this->supplier_collection_ == 0x112)
00988     return new TAO_ESF_Copy_On_Write<TAO_CEC_ProxyPushSupplier,
00989       TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPushSupplier>,
00990       TAO_CEC_PushSupplier_RB_Tree_Iterator,
00991       ACE_NULL_SYNCH> ();
00992   else if (this->supplier_collection_ == 0x113)
00993     return new TAO_ESF_Delayed_Changes<TAO_CEC_ProxyPushSupplier,
00994       TAO_ESF_Proxy_RB_Tree<TAO_CEC_ProxyPushSupplier>,
00995       TAO_CEC_PushSupplier_RB_Tree_Iterator,
00996       ACE_NULL_SYNCH> ();
00997 
00998   return 0;
00999 }

TAO_CEC_Pulling_Strategy * TAO_CEC_Default_Factory::create_pulling_strategy TAO_CEC_EventChannel  )  [virtual]
 

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 }

TAO_CEC_SupplierAdmin * TAO_CEC_Default_Factory::create_supplier_admin TAO_CEC_EventChannel  )  [virtual]
 

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 }

TAO_CEC_SupplierControl * TAO_CEC_Default_Factory::create_supplier_control TAO_CEC_EventChannel  )  [virtual]
 

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 }

ACE_Lock * TAO_CEC_Default_Factory::create_supplier_lock void   )  [virtual]
 

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 }

void TAO_CEC_Default_Factory::destroy_consumer_admin TAO_CEC_ConsumerAdmin  )  [virtual]
 

Implements TAO_CEC_Factory.

Definition at line 484 of file CEC_Default_Factory.cpp.

00485 {
00486   delete x;
00487 }

void TAO_CEC_Default_Factory::destroy_consumer_control TAO_CEC_ConsumerControl  )  [virtual]
 

Implements TAO_CEC_Factory.

Definition at line 1270 of file CEC_Default_Factory.cpp.

01271 {
01272   delete x;
01273 }

void TAO_CEC_Default_Factory::destroy_consumer_lock ACE_Lock  )  [virtual]
 

Implements TAO_CEC_Factory.

Definition at line 1202 of file CEC_Default_Factory.cpp.

01203 {
01204   delete x;
01205 }

void TAO_CEC_Default_Factory::destroy_dispatching TAO_CEC_Dispatching  )  [virtual]
 

Implements TAO_CEC_Factory.

Definition at line 440 of file CEC_Default_Factory.cpp.

00441 {
00442   delete x;
00443 }

void TAO_CEC_Default_Factory::destroy_proxy_pull_consumer TAO_CEC_ProxyPullConsumer  )  [virtual]
 

Implements TAO_CEC_Factory.

Definition at line 592 of file CEC_Default_Factory.cpp.

00593 {
00594   delete x;
00595 }

void TAO_CEC_Default_Factory::destroy_proxy_pull_consumer_collection TAO_CEC_ProxyPullConsumer_Collection  )  [virtual]
 

Implements TAO_CEC_Factory.

Definition at line 909 of file CEC_Default_Factory.cpp.

References TAO_CEC_ProxyPullConsumer_Collection.

00910 {
00911   delete x;
00912 }

void TAO_CEC_Default_Factory::destroy_proxy_pull_supplier TAO_CEC_ProxyPullSupplier  )  [virtual]
 

Implements TAO_CEC_Factory.

Definition at line 552 of file CEC_Default_Factory.cpp.

00553 {
00554   delete x;
00555 }

void TAO_CEC_Default_Factory::destroy_proxy_pull_supplier_collection TAO_CEC_ProxyPullSupplier_Collection  )  [virtual]
 

Implements TAO_CEC_Factory.

Definition at line 1184 of file CEC_Default_Factory.cpp.

References TAO_CEC_ProxyPullSupplier_Collection.

01185 {
01186   delete x;
01187 }

void TAO_CEC_Default_Factory::destroy_proxy_push_consumer TAO_CEC_ProxyPushConsumer  )  [virtual]
 

Implements TAO_CEC_Factory.

Definition at line 572 of file CEC_Default_Factory.cpp.

00573 {
00574   delete x;
00575 }

void TAO_CEC_Default_Factory::destroy_proxy_push_consumer_collection TAO_CEC_ProxyPushConsumer_Collection  )  [virtual]
 

Implements TAO_CEC_Factory.

Definition at line 808 of file CEC_Default_Factory.cpp.

References TAO_CEC_ProxyPushConsumer_Collection.

00809 {
00810   delete x;
00811 }

void TAO_CEC_Default_Factory::destroy_proxy_push_supplier TAO_CEC_ProxyPushSupplier  )  [virtual]
 

Implements TAO_CEC_Factory.

Definition at line 540 of file CEC_Default_Factory.cpp.

00541 {
00542   delete x;
00543 }

void TAO_CEC_Default_Factory::destroy_proxy_push_supplier_collection TAO_CEC_ProxyPushSupplier_Collection  )  [virtual]
 

Implements TAO_CEC_Factory.

Definition at line 1091 of file CEC_Default_Factory.cpp.

References TAO_CEC_ProxyPushSupplier_Collection.

01092 {
01093   delete x;
01094 }

void TAO_CEC_Default_Factory::destroy_pulling_strategy TAO_CEC_Pulling_Strategy  )  [virtual]
 

Implements TAO_CEC_Factory.

Definition at line 464 of file CEC_Default_Factory.cpp.

00465 {
00466   delete x;
00467 }

void TAO_CEC_Default_Factory::destroy_supplier_admin TAO_CEC_SupplierAdmin  )  [virtual]
 

Implements TAO_CEC_Factory.

Definition at line 512 of file CEC_Default_Factory.cpp.

00513 {
00514   delete x;
00515 }

void TAO_CEC_Default_Factory::destroy_supplier_control TAO_CEC_SupplierControl  )  [virtual]
 

Implements TAO_CEC_Factory.

Definition at line 1320 of file CEC_Default_Factory.cpp.

01321 {
01322   delete x;
01323 }

void TAO_CEC_Default_Factory::destroy_supplier_lock ACE_Lock  )  [virtual]
 

Implements TAO_CEC_Factory.

Definition at line 1220 of file CEC_Default_Factory.cpp.

01221 {
01222   delete x;
01223 }

int TAO_CEC_Default_Factory::fini void   )  [virtual]
 

Reimplemented from ACE_Shared_Object.

Definition at line 404 of file CEC_Default_Factory.cpp.

00405 {
00406   return 0;
00407 }

int TAO_CEC_Default_Factory::init int  argc,
ACE_TCHAR argv[]
[virtual]
 

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 }

int TAO_CEC_Default_Factory::init_svcs void   )  [static]
 

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 }

int TAO_CEC_Default_Factory::parse_collection_arg ACE_TCHAR opt  )  [private]
 

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 }


Member Data Documentation

int TAO_CEC_Default_Factory::consumer_collection_ [private]
 

Definition at line 172 of file CEC_Default_Factory.h.

Referenced by create_proxy_pull_consumer_collection(), create_proxy_push_consumer_collection(), and init().

int TAO_CEC_Default_Factory::consumer_control_ [private]
 

The consumer and supplier control policies.

Definition at line 195 of file CEC_Default_Factory.h.

Referenced by create_consumer_control(), and init().

int TAO_CEC_Default_Factory::consumer_control_period_ [private]
 

The consumer and supplier control periods in usecs.

Definition at line 199 of file CEC_Default_Factory.h.

Referenced by init().

ACE_Time_Value TAO_CEC_Default_Factory::consumer_control_timeout_ [private]
 

The consumer and supplier control timeout in usecs.

Definition at line 203 of file CEC_Default_Factory.h.

Referenced by init().

int TAO_CEC_Default_Factory::consumer_lock_ [private]
 

Definition at line 174 of file CEC_Default_Factory.h.

Referenced by create_consumer_lock(), and init().

int TAO_CEC_Default_Factory::dispatching_ [private]
 

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().

int TAO_CEC_Default_Factory::dispatching_threads_ [private]
 

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().

int TAO_CEC_Default_Factory::dispatching_threads_flags_ [private]
 

Definition at line 180 of file CEC_Default_Factory.h.

Referenced by init().

int TAO_CEC_Default_Factory::dispatching_threads_force_active_ [private]
 

Definition at line 182 of file CEC_Default_Factory.h.

int TAO_CEC_Default_Factory::dispatching_threads_priority_ [private]
 

Definition at line 181 of file CEC_Default_Factory.h.

Referenced by init().

char* TAO_CEC_Default_Factory::orbid_ [private]
 

Use this ORB to locate global resources.

Definition at line 189 of file CEC_Default_Factory.h.

int TAO_CEC_Default_Factory::orbid_dupped_ [private]
 

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().

unsigned int TAO_CEC_Default_Factory::proxy_disconnect_retries_ [private]
 

The number of retries before disconnecting a proxy.

Definition at line 207 of file CEC_Default_Factory.h.

Referenced by init().

int TAO_CEC_Default_Factory::pulling_strategy_ [private]
 

Definition at line 171 of file CEC_Default_Factory.h.

Referenced by create_pulling_strategy().

int TAO_CEC_Default_Factory::reactive_pulling_period_ [private]
 

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().

int TAO_CEC_Default_Factory::supplier_collection_ [private]
 

Definition at line 173 of file CEC_Default_Factory.h.

Referenced by create_proxy_pull_supplier_collection(), create_proxy_push_supplier_collection(), and init().

int TAO_CEC_Default_Factory::supplier_control_ [private]
 

Definition at line 196 of file CEC_Default_Factory.h.

Referenced by create_supplier_control(), and init().

int TAO_CEC_Default_Factory::supplier_control_period_ [private]
 

Definition at line 200 of file CEC_Default_Factory.h.

Referenced by init().

ACE_Time_Value TAO_CEC_Default_Factory::supplier_control_timeout_ [private]
 

Definition at line 204 of file CEC_Default_Factory.h.

Referenced by init().

int TAO_CEC_Default_Factory::supplier_lock_ [private]
 

Definition at line 175 of file CEC_Default_Factory.h.

Referenced by create_supplier_lock(), and init().


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 13:19:20 2006 for TAO_CosEvent by doxygen 1.3.6