#include <EC_Default_Factory.h>
Inheritance diagram for TAO_EC_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.
Definition at line 47 of file EC_Default_Factory.h.
TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE TAO_EC_Default_Factory::TAO_EC_Default_Factory | ( | void | ) |
Constructor.
Definition at line 8 of file EC_Default_Factory.inl.
00009 : dispatching_ (TAO_EC_DEFAULT_DISPATCHING), 00010 filtering_ (TAO_EC_DEFAULT_CONSUMER_FILTER), 00011 supplier_filtering_ (TAO_EC_DEFAULT_SUPPLIER_FILTER), 00012 timeout_ (TAO_EC_DEFAULT_TIMEOUT), 00013 observer_ (TAO_EC_DEFAULT_OBSERVER), 00014 scheduling_ (TAO_EC_DEFAULT_SCHEDULING), 00015 consumer_collection_ (TAO_EC_DEFAULT_CONSUMER_COLLECTION), 00016 supplier_collection_ (TAO_EC_DEFAULT_SUPPLIER_COLLECTION), 00017 consumer_lock_ (TAO_EC_DEFAULT_CONSUMER_LOCK), 00018 supplier_lock_ (TAO_EC_DEFAULT_SUPPLIER_LOCK), 00019 dispatching_threads_ (TAO_EC_DEFAULT_DISPATCHING_THREADS), 00020 dispatching_threads_flags_ (TAO_EC_DEFAULT_DISPATCHING_THREADS_FLAGS), 00021 dispatching_threads_priority_ (TAO_EC_DEFAULT_DISPATCHING_THREADS_PRIORITY), 00022 dispatching_threads_force_active_ (TAO_EC_DEFAULT_DISPATCHING_THREADS_FORCE_ACTIVE), 00023 queue_full_service_object_name_ (TAO_EC_DEFAULT_QUEUE_FULL_SERVICE_OBJECT_NAME), 00024 orbid_ (TAO_EC_DEFAULT_ORB_ID), 00025 consumer_control_ (TAO_EC_DEFAULT_CONSUMER_CONTROL), 00026 supplier_control_ (TAO_EC_DEFAULT_SUPPLIER_CONTROL), 00027 consumer_control_period_ (TAO_EC_DEFAULT_CONSUMER_CONTROL_PERIOD), 00028 supplier_control_period_ (TAO_EC_DEFAULT_SUPPLIER_CONTROL_PERIOD), 00029 consumer_control_timeout_ (0, TAO_EC_DEFAULT_CONSUMER_CONTROL_TIMEOUT), 00030 supplier_control_timeout_ (0, TAO_EC_DEFAULT_SUPPLIER_CONTROL_TIMEOUT), 00031 consumer_validate_connection_ (TAO_EC_DEFAULT_CONSUMER_VALIDATE_CONNECTION) 00032 { 00033 }
TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_EC_Default_Factory::~TAO_EC_Default_Factory | ( | void | ) | [virtual] |
ACE_INLINE int TAO_EC_Default_Factory::consumer_collection | ( | void | ) | const |
Accessors to consumer collection flags.
Definition at line 36 of file EC_Default_Factory.inl.
References consumer_collection_.
00037 { 00038 return this->consumer_collection_; 00039 }
TAO_EC_ConsumerAdmin * TAO_EC_Default_Factory::create_consumer_admin | ( | TAO_EC_Event_Channel_Base * | ) | [virtual] |
Create and destroy the consumer admin implementation.
Implements TAO_EC_Factory.
Definition at line 624 of file EC_Default_Factory.cpp.
00625 { 00626 return new TAO_EC_ConsumerAdmin (ec); 00627 }
TAO_EC_ConsumerControl * TAO_EC_Default_Factory::create_consumer_control | ( | TAO_EC_Event_Channel_Base * | ) | [virtual] |
The ConsumerControl and SupplierControl strategies are used to discard non-existent consumers and suppliers
Implements TAO_EC_Factory.
Definition at line 980 of file EC_Default_Factory.cpp.
References consumer_control_timeout_, TAO_Pseudo_Var_T< T >::in(), and CORBA::ORB_init().
00981 { 00982 if (this->consumer_control_ == 0) 00983 return new TAO_EC_ConsumerControl (); 00984 else if (this->consumer_control_ == 1) 00985 { 00986 int argc = 0; 00987 char **argv = 0; 00988 CORBA::ORB_var orb = 00989 CORBA::ORB_init (argc, argv, this->orbid_.c_str ()); 00990 00991 ACE_Time_Value rate (0, this->consumer_control_period_); 00992 return new TAO_EC_Reactive_ConsumerControl (rate, consumer_control_timeout_, ec, orb.in ()); 00993 } 00994 return 0; 00995 }
ACE_Lock * TAO_EC_Default_Factory::create_consumer_lock | ( | void | ) | [virtual] |
Create and destroy the locking strategies for both ProxyPushConsumers and ProxyPushSuppliers
Implements TAO_EC_Factory.
Definition at line 944 of file EC_Default_Factory.cpp.
00945 { 00946 if (this->consumer_lock_ == 0) 00947 return new ACE_Lock_Adapter<ACE_Null_Mutex>; 00948 else if (this->consumer_lock_ == 1) 00949 return new ACE_Lock_Adapter<TAO_SYNCH_MUTEX> (); 00950 else if (this->consumer_lock_ == 2) 00951 return new ACE_Lock_Adapter<TAO_SYNCH_RECURSIVE_MUTEX> (); 00952 return 0; 00953 }
TAO_EC_Dispatching * TAO_EC_Default_Factory::create_dispatching | ( | TAO_EC_Event_Channel_Base * | ) | [virtual] |
Create and destroy the dispatching module.
Implements TAO_EC_Factory.
Reimplemented in TAO_EC_Kokyu_Factory, TAO_EC_Sched_Factory, and TAO_EC_TPC_Factory.
Definition at line 565 of file EC_Default_Factory.cpp.
References find_service_object(), and TAO_EC_DEFAULT_QUEUE_FULL_SERVICE_OBJECT_NAME.
Referenced by TAO_EC_Sched_Factory::create_dispatching(), and TAO_EC_Kokyu_Factory::create_dispatching().
00566 { 00567 if (this->dispatching_ == 0) 00568 return new TAO_EC_Reactive_Dispatching (); 00569 else if (this->dispatching_ == 1) 00570 { 00571 TAO_EC_Queue_Full_Service_Object* so = 00572 this->find_service_object (this->queue_full_service_object_name_.fast_rep(), 00573 TAO_EC_DEFAULT_QUEUE_FULL_SERVICE_OBJECT_NAME); 00574 return new TAO_EC_MT_Dispatching (this->dispatching_threads_, 00575 this->dispatching_threads_flags_, 00576 this->dispatching_threads_priority_, 00577 this->dispatching_threads_force_active_, 00578 so); 00579 } 00580 return 0; 00581 }
TAO_EC_Filter_Builder * TAO_EC_Default_Factory::create_filter_builder | ( | TAO_EC_Event_Channel_Base * | ) | [virtual] |
Create and destroy the filter builder.
Implements TAO_EC_Factory.
Reimplemented in TAO_EC_Kokyu_Factory, and TAO_EC_Sched_Factory.
Definition at line 590 of file EC_Default_Factory.cpp.
Referenced by TAO_EC_Sched_Factory::create_filter_builder(), and TAO_EC_Kokyu_Factory::create_filter_builder().
00591 { 00592 if (this->filtering_ == 0) 00593 return new TAO_EC_Null_Filter_Builder (); 00594 else if (this->filtering_ == 1) 00595 return new TAO_EC_Basic_Filter_Builder (ec); 00596 else if (this->filtering_ == 2) 00597 return new TAO_EC_Prefix_Filter_Builder (ec); 00598 return 0; 00599 }
TAO_EC_ObserverStrategy * TAO_EC_Default_Factory::create_observer_strategy | ( | TAO_EC_Event_Channel_Base * | ) | [virtual] |
Create and destroy the observer strategy.
Implements TAO_EC_Factory.
Definition at line 699 of file EC_Default_Factory.cpp.
References ACE_NEW_RETURN.
00700 { 00701 if (this->observer_ == 0) 00702 return new TAO_EC_Null_ObserverStrategy; 00703 else if (this->observer_ == 1) 00704 { 00705 // @@ The lock should also be under control of the user... 00706 ACE_Lock* lock = 0; 00707 ACE_NEW_RETURN (lock, ACE_Lock_Adapter<TAO_SYNCH_MUTEX>, 0); 00708 return new TAO_EC_Basic_ObserverStrategy (ec, lock); 00709 } 00710 else if (this->observer_ == 2) 00711 { 00712 // @@ The lock should also be under control of the user... 00713 ACE_Lock* lock = 0; 00714 ACE_NEW_RETURN (lock, ACE_Lock_Adapter<TAO_SYNCH_MUTEX>, 0); 00715 return new TAO_EC_Reactive_ObserverStrategy (ec, lock); 00716 } 00717 return 0; 00718 }
TAO_EC_ProxyPushConsumer * TAO_EC_Default_Factory::create_proxy_push_consumer | ( | TAO_EC_Event_Channel_Base * | ) | [virtual] |
Create and destroy a ProxyPushConsumer.
Implements TAO_EC_Factory.
Reimplemented in TAO_EC_TPC_Factory.
Definition at line 660 of file EC_Default_Factory.cpp.
00661 { 00662 return new TAO_EC_Default_ProxyPushConsumer (ec); 00663 }
TAO_EC_ProxyPushConsumer_Collection * TAO_EC_Default_Factory::create_proxy_push_consumer_collection | ( | TAO_EC_Event_Channel_Base * | ) | [virtual] |
Create and destroy a collection of TAO_EC_ProxyPushConsumers.
Implements TAO_EC_Factory.
Definition at line 758 of file EC_Default_Factory.cpp.
References ACE_NULL_SYNCH, ACE_SYNCH, and TAO_SYNCH_MUTEX.
00759 { 00760 if (this->consumer_collection_ == 0x000) 00761 return new TAO_ESF_Immediate_Changes<TAO_EC_ProxyPushConsumer, 00762 TAO_ESF_Proxy_List<TAO_EC_ProxyPushConsumer>, 00763 TAO_EC_Consumer_List_Iterator, 00764 TAO_SYNCH_MUTEX> (); 00765 else if (this->consumer_collection_ == 0x001) 00766 return new TAO_ESF_Copy_On_Read<TAO_EC_ProxyPushConsumer, 00767 TAO_ESF_Proxy_List<TAO_EC_ProxyPushConsumer>, 00768 TAO_EC_Consumer_List_Iterator, 00769 TAO_SYNCH_MUTEX> (); 00770 else if (this->consumer_collection_ == 0x002) 00771 return new TAO_ESF_Copy_On_Write<TAO_EC_ProxyPushConsumer, 00772 TAO_ESF_Proxy_List<TAO_EC_ProxyPushConsumer>, 00773 TAO_EC_Consumer_List_Iterator, 00774 ACE_SYNCH> (); 00775 else if (this->consumer_collection_ == 0x003) 00776 return new TAO_ESF_Delayed_Changes<TAO_EC_ProxyPushConsumer, 00777 TAO_ESF_Proxy_List<TAO_EC_ProxyPushConsumer>, 00778 TAO_EC_Consumer_List_Iterator, 00779 ACE_SYNCH> (); 00780 else if (this->consumer_collection_ == 0x010) 00781 return new TAO_ESF_Immediate_Changes<TAO_EC_ProxyPushConsumer, 00782 TAO_ESF_Proxy_RB_Tree<TAO_EC_ProxyPushConsumer>, 00783 TAO_EC_Consumer_RB_Tree_Iterator, 00784 TAO_SYNCH_MUTEX> (); 00785 else if (this->consumer_collection_ == 0x011) 00786 return new TAO_ESF_Copy_On_Read<TAO_EC_ProxyPushConsumer, 00787 TAO_ESF_Proxy_RB_Tree<TAO_EC_ProxyPushConsumer>, 00788 TAO_EC_Consumer_RB_Tree_Iterator, 00789 TAO_SYNCH_MUTEX> (); 00790 else if (this->consumer_collection_ == 0x012) 00791 return new TAO_ESF_Copy_On_Write<TAO_EC_ProxyPushConsumer, 00792 TAO_ESF_Proxy_RB_Tree<TAO_EC_ProxyPushConsumer>, 00793 TAO_EC_Consumer_RB_Tree_Iterator, 00794 ACE_SYNCH> (); 00795 else if (this->consumer_collection_ == 0x013) 00796 return new TAO_ESF_Delayed_Changes<TAO_EC_ProxyPushConsumer, 00797 TAO_ESF_Proxy_RB_Tree<TAO_EC_ProxyPushConsumer>, 00798 TAO_EC_Consumer_RB_Tree_Iterator, 00799 ACE_SYNCH> (); 00800 else if (this->consumer_collection_ == 0x100) 00801 return new TAO_ESF_Immediate_Changes<TAO_EC_ProxyPushConsumer, 00802 TAO_ESF_Proxy_List<TAO_EC_ProxyPushConsumer>, 00803 TAO_EC_Consumer_List_Iterator, 00804 ACE_Null_Mutex> (); 00805 else if (this->consumer_collection_ == 0x101) 00806 return new TAO_ESF_Copy_On_Read<TAO_EC_ProxyPushConsumer, 00807 TAO_ESF_Proxy_List<TAO_EC_ProxyPushConsumer>, 00808 TAO_EC_Consumer_List_Iterator, 00809 ACE_Null_Mutex> (); 00810 else if (this->consumer_collection_ == 0x102) 00811 return new TAO_ESF_Copy_On_Write<TAO_EC_ProxyPushConsumer, 00812 TAO_ESF_Proxy_List<TAO_EC_ProxyPushConsumer>, 00813 TAO_EC_Consumer_List_Iterator, 00814 ACE_NULL_SYNCH> (); 00815 else if (this->consumer_collection_ == 0x103) 00816 return new TAO_ESF_Delayed_Changes<TAO_EC_ProxyPushConsumer, 00817 TAO_ESF_Proxy_List<TAO_EC_ProxyPushConsumer>, 00818 TAO_EC_Consumer_List_Iterator, 00819 ACE_NULL_SYNCH> (); 00820 else if (this->consumer_collection_ == 0x110) 00821 return new TAO_ESF_Immediate_Changes<TAO_EC_ProxyPushConsumer, 00822 TAO_ESF_Proxy_RB_Tree<TAO_EC_ProxyPushConsumer>, 00823 TAO_EC_Consumer_RB_Tree_Iterator, 00824 ACE_Null_Mutex> (); 00825 else if (this->consumer_collection_ == 0x111) 00826 return new TAO_ESF_Copy_On_Read<TAO_EC_ProxyPushConsumer, 00827 TAO_ESF_Proxy_RB_Tree<TAO_EC_ProxyPushConsumer>, 00828 TAO_EC_Consumer_RB_Tree_Iterator, 00829 ACE_Null_Mutex> (); 00830 else if (this->consumer_collection_ == 0x112) 00831 return new TAO_ESF_Copy_On_Write<TAO_EC_ProxyPushConsumer, 00832 TAO_ESF_Proxy_RB_Tree<TAO_EC_ProxyPushConsumer>, 00833 TAO_EC_Consumer_RB_Tree_Iterator, 00834 ACE_NULL_SYNCH> (); 00835 else if (this->consumer_collection_ == 0x113) 00836 return new TAO_ESF_Delayed_Changes<TAO_EC_ProxyPushConsumer, 00837 TAO_ESF_Proxy_RB_Tree<TAO_EC_ProxyPushConsumer>, 00838 TAO_EC_Consumer_RB_Tree_Iterator, 00839 ACE_NULL_SYNCH> (); 00840 00841 return 0; 00842 }
TAO_EC_ProxyPushSupplier * TAO_EC_Default_Factory::create_proxy_push_supplier | ( | TAO_EC_Event_Channel_Base * | ) | [virtual] |
Create and destroy a ProxyPushSupplier.
Implements TAO_EC_Factory.
Reimplemented in TAO_EC_TPC_Factory.
Definition at line 648 of file EC_Default_Factory.cpp.
References consumer_validate_connection_.
00649 { 00650 return new TAO_EC_Default_ProxyPushSupplier (ec, consumer_validate_connection_); 00651 }
TAO_EC_ProxyPushSupplier_Collection * TAO_EC_Default_Factory::create_proxy_push_supplier_collection | ( | TAO_EC_Event_Channel_Base * | ) | [virtual] |
Create and destroy a collection of TAO_EC_ProxyPushSuppliers.
Implements TAO_EC_Factory.
Definition at line 851 of file EC_Default_Factory.cpp.
References ACE_NULL_SYNCH, ACE_SYNCH, and TAO_SYNCH_MUTEX.
00852 { 00853 if (this->supplier_collection_ == 0x000) 00854 return new TAO_ESF_Immediate_Changes<TAO_EC_ProxyPushSupplier, 00855 TAO_ESF_Proxy_List<TAO_EC_ProxyPushSupplier>, 00856 TAO_EC_Supplier_List_Iterator, 00857 TAO_SYNCH_MUTEX> (); 00858 else if (this->supplier_collection_ == 0x001) 00859 return new TAO_ESF_Copy_On_Read<TAO_EC_ProxyPushSupplier, 00860 TAO_ESF_Proxy_List<TAO_EC_ProxyPushSupplier>, 00861 TAO_EC_Supplier_List_Iterator, 00862 TAO_SYNCH_MUTEX> (); 00863 else if (this->supplier_collection_ == 0x002) 00864 return new TAO_ESF_Copy_On_Write<TAO_EC_ProxyPushSupplier, 00865 TAO_ESF_Proxy_List<TAO_EC_ProxyPushSupplier>, 00866 TAO_EC_Supplier_List_Iterator, 00867 ACE_SYNCH> (); 00868 else if (this->supplier_collection_ == 0x003) 00869 return new TAO_ESF_Delayed_Changes<TAO_EC_ProxyPushSupplier, 00870 TAO_ESF_Proxy_List<TAO_EC_ProxyPushSupplier>, 00871 TAO_EC_Supplier_List_Iterator, 00872 ACE_SYNCH> (); 00873 else if (this->supplier_collection_ == 0x010) 00874 return new TAO_ESF_Immediate_Changes<TAO_EC_ProxyPushSupplier, 00875 TAO_ESF_Proxy_RB_Tree<TAO_EC_ProxyPushSupplier>, 00876 TAO_EC_Supplier_RB_Tree_Iterator, 00877 TAO_SYNCH_MUTEX> (); 00878 else if (this->supplier_collection_ == 0x011) 00879 return new TAO_ESF_Copy_On_Read<TAO_EC_ProxyPushSupplier, 00880 TAO_ESF_Proxy_RB_Tree<TAO_EC_ProxyPushSupplier>, 00881 TAO_EC_Supplier_RB_Tree_Iterator, 00882 TAO_SYNCH_MUTEX> (); 00883 else if (this->supplier_collection_ == 0x012) 00884 return new TAO_ESF_Copy_On_Write<TAO_EC_ProxyPushSupplier, 00885 TAO_ESF_Proxy_RB_Tree<TAO_EC_ProxyPushSupplier>, 00886 TAO_EC_Supplier_RB_Tree_Iterator, 00887 ACE_SYNCH> (); 00888 else if (this->supplier_collection_ == 0x013) 00889 return new TAO_ESF_Delayed_Changes<TAO_EC_ProxyPushSupplier, 00890 TAO_ESF_Proxy_RB_Tree<TAO_EC_ProxyPushSupplier>, 00891 TAO_EC_Supplier_RB_Tree_Iterator, 00892 ACE_SYNCH> (); 00893 else if (this->supplier_collection_ == 0x100) 00894 return new TAO_ESF_Immediate_Changes<TAO_EC_ProxyPushSupplier, 00895 TAO_ESF_Proxy_List<TAO_EC_ProxyPushSupplier>, 00896 TAO_EC_Supplier_List_Iterator, 00897 ACE_Null_Mutex> (); 00898 else if (this->supplier_collection_ == 0x101) 00899 return new TAO_ESF_Copy_On_Read<TAO_EC_ProxyPushSupplier, 00900 TAO_ESF_Proxy_List<TAO_EC_ProxyPushSupplier>, 00901 TAO_EC_Supplier_List_Iterator, 00902 ACE_Null_Mutex> (); 00903 else if (this->supplier_collection_ == 0x102) 00904 return new TAO_ESF_Copy_On_Write<TAO_EC_ProxyPushSupplier, 00905 TAO_ESF_Proxy_List<TAO_EC_ProxyPushSupplier>, 00906 TAO_EC_Supplier_List_Iterator, 00907 ACE_NULL_SYNCH> (); 00908 else if (this->supplier_collection_ == 0x103) 00909 return new TAO_ESF_Delayed_Changes<TAO_EC_ProxyPushSupplier, 00910 TAO_ESF_Proxy_List<TAO_EC_ProxyPushSupplier>, 00911 TAO_EC_Supplier_List_Iterator, 00912 ACE_NULL_SYNCH> (); 00913 else if (this->supplier_collection_ == 0x110) 00914 return new TAO_ESF_Immediate_Changes<TAO_EC_ProxyPushSupplier, 00915 TAO_ESF_Proxy_RB_Tree<TAO_EC_ProxyPushSupplier>, 00916 TAO_EC_Supplier_RB_Tree_Iterator, 00917 ACE_Null_Mutex> (); 00918 else if (this->supplier_collection_ == 0x111) 00919 return new TAO_ESF_Copy_On_Read<TAO_EC_ProxyPushSupplier, 00920 TAO_ESF_Proxy_RB_Tree<TAO_EC_ProxyPushSupplier>, 00921 TAO_EC_Supplier_RB_Tree_Iterator, 00922 ACE_Null_Mutex> (); 00923 else if (this->supplier_collection_ == 0x112) 00924 return new TAO_ESF_Copy_On_Write<TAO_EC_ProxyPushSupplier, 00925 TAO_ESF_Proxy_RB_Tree<TAO_EC_ProxyPushSupplier>, 00926 TAO_EC_Supplier_RB_Tree_Iterator, 00927 ACE_NULL_SYNCH> (); 00928 else if (this->supplier_collection_ == 0x113) 00929 return new TAO_ESF_Delayed_Changes<TAO_EC_ProxyPushSupplier, 00930 TAO_ESF_Proxy_RB_Tree<TAO_EC_ProxyPushSupplier>, 00931 TAO_EC_Supplier_RB_Tree_Iterator, 00932 ACE_NULL_SYNCH> (); 00933 00934 return 0; 00935 }
TAO_EC_Scheduling_Strategy * TAO_EC_Default_Factory::create_scheduling_strategy | ( | TAO_EC_Event_Channel_Base * | ) | [virtual] |
Create and destroy the observer strategy.
Implements TAO_EC_Factory.
Reimplemented in TAO_EC_Kokyu_Factory, and TAO_EC_Sched_Factory.
Definition at line 727 of file EC_Default_Factory.cpp.
Referenced by TAO_EC_Kokyu_Factory::create_scheduling_strategy().
00728 { 00729 if (this->scheduling_ == 0) 00730 return new TAO_EC_Null_Scheduling; 00731 else if (this->scheduling_ == 1) 00732 return new TAO_EC_Group_Scheduling; 00733 return 0; 00734 }
TAO_EC_SupplierAdmin * TAO_EC_Default_Factory::create_supplier_admin | ( | TAO_EC_Event_Channel_Base * | ) | [virtual] |
Create and destroy the supplier admin implementation.
Implements TAO_EC_Factory.
Definition at line 636 of file EC_Default_Factory.cpp.
00637 { 00638 return new TAO_EC_SupplierAdmin (ec); 00639 }
TAO_EC_SupplierControl * TAO_EC_Default_Factory::create_supplier_control | ( | TAO_EC_Event_Channel_Base * | ) | [virtual] |
Implements TAO_EC_Factory.
Definition at line 1004 of file EC_Default_Factory.cpp.
References TAO_Pseudo_Var_T< T >::in(), CORBA::ORB_init(), and supplier_control_timeout_.
01005 { 01006 if (this->supplier_control_ == 0) 01007 return new TAO_EC_SupplierControl (); 01008 else if (this->supplier_control_ == 1) 01009 { 01010 int argc = 0; 01011 char **argv = 0; 01012 CORBA::ORB_var orb = 01013 CORBA::ORB_init (argc, argv, this->orbid_.c_str ()); 01014 01015 ACE_Time_Value rate (0, this->supplier_control_period_); 01016 return new TAO_EC_Reactive_SupplierControl (rate, supplier_control_timeout_, ec, orb.in ()); 01017 } 01018 return 0; 01019 }
TAO_EC_Supplier_Filter_Builder * TAO_EC_Default_Factory::create_supplier_filter_builder | ( | TAO_EC_Event_Channel_Base * | ) | [virtual] |
Create and destroy the filter builder.
Implements TAO_EC_Factory.
Definition at line 608 of file EC_Default_Factory.cpp.
00609 { 00610 if (this->supplier_filtering_ == 0) 00611 return new TAO_EC_Trivial_Supplier_Filter_Builder (ec); 00612 else if (this->supplier_filtering_ == 1) 00613 return new TAO_EC_Per_Supplier_Filter_Builder (ec); 00614 return 0; 00615 }
ACE_Lock * TAO_EC_Default_Factory::create_supplier_lock | ( | void | ) | [virtual] |
Implements TAO_EC_Factory.
Definition at line 962 of file EC_Default_Factory.cpp.
00963 { 00964 if (this->supplier_lock_ == 0) 00965 return new ACE_Lock_Adapter<ACE_Null_Mutex>; 00966 else if (this->supplier_lock_ == 1) 00967 return new ACE_Lock_Adapter<TAO_SYNCH_MUTEX> (); 00968 else if (this->supplier_lock_ == 2) 00969 return new ACE_Lock_Adapter<TAO_SYNCH_RECURSIVE_MUTEX> (); 00970 return 0; 00971 }
TAO_EC_Timeout_Generator * TAO_EC_Default_Factory::create_timeout_generator | ( | TAO_EC_Event_Channel_Base * | ) | [virtual] |
Create and destroy the timer module.
Implements TAO_EC_Factory.
Reimplemented in TAO_EC_Kokyu_Factory, and TAO_EC_Sched_Factory.
Definition at line 672 of file EC_Default_Factory.cpp.
References CORBA::ORB_init(), and ACE_Event_Handler::reactor().
Referenced by TAO_EC_Sched_Factory::create_timeout_generator(), and TAO_EC_Kokyu_Factory::create_timeout_generator().
00673 { 00674 if (this->timeout_ == 0) 00675 { 00676 int argc = 0; 00677 char **argv = 0; 00678 CORBA::ORB_var orb = 00679 CORBA::ORB_init (argc, argv, this->orbid_.c_str ()); 00680 00681 ACE_Reactor *reactor = orb->orb_core ()->reactor (); 00682 return new TAO_EC_Reactive_Timeout_Generator (reactor); 00683 } 00684 #if 0 00685 else if (this->timeout_ == 1) 00686 { 00687 } 00688 #endif 00689 return 0; 00690 }
void TAO_EC_Default_Factory::destroy_consumer_admin | ( | TAO_EC_ConsumerAdmin * | ) | [virtual] |
void TAO_EC_Default_Factory::destroy_consumer_control | ( | TAO_EC_ConsumerControl * | ) | [virtual] |
void TAO_EC_Default_Factory::destroy_consumer_lock | ( | ACE_Lock * | ) | [virtual] |
void TAO_EC_Default_Factory::destroy_dispatching | ( | TAO_EC_Dispatching * | ) | [virtual] |
void TAO_EC_Default_Factory::destroy_filter_builder | ( | TAO_EC_Filter_Builder * | ) | [virtual] |
void TAO_EC_Default_Factory::destroy_observer_strategy | ( | TAO_EC_ObserverStrategy * | ) | [virtual] |
void TAO_EC_Default_Factory::destroy_proxy_push_consumer | ( | TAO_EC_ProxyPushConsumer * | ) | [virtual] |
void TAO_EC_Default_Factory::destroy_proxy_push_consumer_collection | ( | TAO_EC_ProxyPushConsumer_Collection * | ) | [virtual] |
void TAO_EC_Default_Factory::destroy_proxy_push_supplier | ( | TAO_EC_ProxyPushSupplier * | ) | [virtual] |
void TAO_EC_Default_Factory::destroy_proxy_push_supplier_collection | ( | TAO_EC_ProxyPushSupplier_Collection * | ) | [virtual] |
void TAO_EC_Default_Factory::destroy_scheduling_strategy | ( | TAO_EC_Scheduling_Strategy * | ) | [virtual] |
void TAO_EC_Default_Factory::destroy_supplier_admin | ( | TAO_EC_SupplierAdmin * | ) | [virtual] |
void TAO_EC_Default_Factory::destroy_supplier_control | ( | TAO_EC_SupplierControl * | ) | [virtual] |
void TAO_EC_Default_Factory::destroy_supplier_filter_builder | ( | TAO_EC_Supplier_Filter_Builder * | ) | [virtual] |
void TAO_EC_Default_Factory::destroy_supplier_lock | ( | ACE_Lock * | ) | [virtual] |
void TAO_EC_Default_Factory::destroy_timeout_generator | ( | TAO_EC_Timeout_Generator * | ) | [virtual] |
TAO_EC_Queue_Full_Service_Object * TAO_EC_Default_Factory::find_service_object | ( | const char * | wanted, | |
const char * | fallback | |||
) | [protected] |
name of ACE_Service_Object which should be invoked when output queue becomes full
Definition at line 536 of file EC_Default_Factory.cpp.
References ACE_OS::abort(), ACE_ERROR, ACE_Dynamic_Service< TYPE >::instance(), and LM_ERROR.
Referenced by TAO_EC_TPC_Factory::create_dispatching(), and create_dispatching().
00538 { 00539 TAO_EC_Queue_Full_Service_Object* so = 0; 00540 so = ACE_Dynamic_Service<TAO_EC_Queue_Full_Service_Object>::instance (wanted); 00541 if (so != 0) 00542 return so; 00543 00544 ACE_ERROR ((LM_ERROR, 00545 "EC (%P|%t) EC_Default_Factory::find_service_object " 00546 "unable to find queue full service object '%s'; " 00547 "using '%s' instead\n", 00548 wanted, 00549 fallback)); 00550 00551 so = ACE_Dynamic_Service<TAO_EC_Queue_Full_Service_Object>::instance (fallback); 00552 if (so != 0) 00553 return so; 00554 00555 ACE_ERROR ((LM_ERROR, 00556 "EC (%P|%t) EC_Default_Factory::find_service_object " 00557 "unable find default queue full service object '%s'; " 00558 "aborting.\n", 00559 fallback)); 00560 ACE_OS::abort (); 00561 return 0; // superfluous return to de-warn; we should never reach here 00562 }
int TAO_EC_Default_Factory::fini | ( | void | ) | [virtual] |
Reimplemented from ACE_Shared_Object.
Reimplemented in TAO_EC_Kokyu_Factory, and TAO_EC_Sched_Factory.
Definition at line 528 of file EC_Default_Factory.cpp.
int TAO_EC_Default_Factory::init | ( | int | argc, | |
ACE_TCHAR * | argv[] | |||
) | [virtual] |
Reimplemented from ACE_Shared_Object.
Reimplemented in TAO_EC_Kokyu_Factory, TAO_EC_Sched_Factory, and TAO_EC_TPC_Factory.
Definition at line 71 of file EC_Default_Factory.cpp.
References ACE_DEBUG, ACE_ERROR, ACE_SCHED_FIFO, ACE_TEXT(), ACE_TEXT_ALWAYS_CHAR, ACE_TEXT_CHAR_TO_TCHAR, ACE_OS::atoi(), ACE_Arg_Shifter_T< CHAR_TYPE >::consume_arg(), consumer_collection_, consumer_control_, consumer_control_period_, consumer_control_timeout_, consumer_lock_, consumer_validate_connection_, TAO_EC_Thread_Flags::default_priority(), dispatching_, dispatching_threads_, dispatching_threads_flags_, dispatching_threads_priority_, filtering_, TAO_EC_Thread_Flags::flags(), ACE_OS::free(), ACE_Arg_Shifter_T< CHAR_TYPE >::get_current(), ACE_Arg_Shifter_T< CHAR_TYPE >::is_anything_left(), ACE_Arg_Shifter_T< CHAR_TYPE >::is_parameter_next(), LM_DEBUG, LM_ERROR, ACE_Sched_Params::next_priority(), observer_, ACE_Event_Handler::priority(), ACE_Sched_Params::priority_max(), ACE_Sched_Params::priority_min(), queue_full_service_object_name_, scheduling_, ACE_String_Base< CHAR >::set(), ACE_OS::strcasecmp(), ACE_OS::strdup(), ACE_OS::strncmp(), ACE_OS::strtok_r(), ACE_OS::strtol(), ACE_OS::strtoul(), supplier_collection_, supplier_control_, supplier_control_period_, supplier_control_timeout_, supplier_filtering_, supplier_lock_, timeout_, unsupported_option_value(), and ACE_Time_Value::usec().
Referenced by TAO_EC_TPC_Factory::init(), TAO_EC_Sched_Factory::init(), and TAO_EC_Kokyu_Factory::init().
00072 { 00073 ACE_Arg_Shifter arg_shifter (argc, argv); 00074 00075 int priority = 00076 (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO) + 00077 ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2; 00078 this->dispatching_threads_priority_ = 00079 ACE_Sched_Params::next_priority (ACE_SCHED_FIFO, priority); 00080 00081 while (arg_shifter.is_anything_left ()) 00082 { 00083 const ACE_TCHAR *arg = arg_shifter.get_current (); 00084 00085 if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECDispatching")) == 0) 00086 { 00087 arg_shifter.consume_arg (); 00088 00089 if (arg_shifter.is_parameter_next ()) 00090 { 00091 const ACE_TCHAR* opt = arg_shifter.get_current (); 00092 if (ACE_OS::strcasecmp (opt, ACE_TEXT("reactive")) == 0) 00093 this->dispatching_ = 0; 00094 else if (ACE_OS::strcasecmp (opt, ACE_TEXT("mt")) == 0) 00095 this->dispatching_ = 1; 00096 else 00097 this->unsupported_option_value ("-ECDispatching", opt); 00098 arg_shifter.consume_arg (); 00099 } 00100 } 00101 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECDispatchingThreadFlags")) == 0) 00102 { 00103 arg_shifter.consume_arg (); 00104 00105 // Need to be in the form of <flags>:<priority> 00106 if (arg_shifter.is_parameter_next ()) 00107 { 00108 const ACE_TCHAR* s = arg_shifter.get_current (); 00109 // need to parse the flags...ugh 00110 ACE_TCHAR* opt = ACE_OS::strdup (s); 00111 00112 ACE_TCHAR* aux; 00113 ACE_TCHAR* flags = ACE_OS::strtok_r (opt, ACE_TEXT_CHAR_TO_TCHAR(":"), &aux); 00114 00115 TAO_EC_Thread_Flags tf(ACE_TEXT_ALWAYS_CHAR (flags)); // parse and set up 00116 this->dispatching_threads_flags_ = tf.flags (); 00117 00118 ACE_TCHAR* arg = ACE_OS::strtok_r (0, ACE_TEXT_CHAR_TO_TCHAR(":"), &aux); 00119 if (arg) 00120 { 00121 long prio = ACE_OS::strtol (arg, 0, 0); 00122 00123 this->dispatching_threads_priority_ = prio; 00124 } 00125 else 00126 { 00127 // Should we set the default priority? 00128 this->dispatching_threads_priority_ = tf.default_priority (); 00129 } 00130 ACE_OS::free (opt); 00131 arg_shifter.consume_arg (); 00132 } 00133 } 00134 00135 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECDispatchingThreads")) == 0) 00136 { 00137 arg_shifter.consume_arg (); 00138 00139 if (arg_shifter.is_parameter_next ()) 00140 { 00141 const ACE_TCHAR* opt = arg_shifter.get_current (); 00142 this->dispatching_threads_ = ACE_OS::atoi (opt); 00143 arg_shifter.consume_arg (); 00144 } 00145 } 00146 00147 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECFiltering")) == 0) 00148 { 00149 arg_shifter.consume_arg (); 00150 00151 if (arg_shifter.is_parameter_next ()) 00152 { 00153 const ACE_TCHAR* opt = arg_shifter.get_current (); 00154 if (ACE_OS::strcasecmp (opt, ACE_TEXT("null")) == 0) 00155 this->filtering_ = 0; 00156 else if (ACE_OS::strcasecmp (opt, ACE_TEXT("basic")) == 0) 00157 this->filtering_ = 1; 00158 else if (ACE_OS::strcasecmp (opt, ACE_TEXT("prefix")) == 0) 00159 this->filtering_ = 2; 00160 else 00161 this->unsupported_option_value ("-ECFiltering", opt); 00162 arg_shifter.consume_arg (); 00163 } 00164 } 00165 00166 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECSupplierFilter")) == 0 00167 // @@ TODO remove, only for backwards compatibility 00168 || ACE_OS::strcasecmp (arg, ACE_TEXT("-ECSupplierFiltering")) == 0) 00169 { 00170 arg_shifter.consume_arg (); 00171 00172 if (arg_shifter.is_parameter_next ()) 00173 { 00174 const ACE_TCHAR* opt = arg_shifter.get_current (); 00175 if (ACE_OS::strcasecmp (opt, ACE_TEXT("null")) == 0) 00176 this->supplier_filtering_ = 0; 00177 else if (ACE_OS::strcasecmp (opt, ACE_TEXT("per-supplier")) == 0) 00178 this->supplier_filtering_ = 1; 00179 else 00180 this->unsupported_option_value ("-ECSupplierFilter", opt); 00181 arg_shifter.consume_arg (); 00182 } 00183 } 00184 00185 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECTimeout")) == 0) 00186 { 00187 arg_shifter.consume_arg (); 00188 00189 if (arg_shifter.is_parameter_next ()) 00190 { 00191 const ACE_TCHAR* opt = arg_shifter.get_current (); 00192 if (ACE_OS::strcasecmp (opt, ACE_TEXT("reactive")) == 0) 00193 this->timeout_ = 0; 00194 else 00195 this->unsupported_option_value ("-ECTimeout", opt); 00196 arg_shifter.consume_arg (); 00197 } 00198 } 00199 00200 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECObserver")) == 0) 00201 { 00202 arg_shifter.consume_arg (); 00203 00204 if (arg_shifter.is_parameter_next ()) 00205 { 00206 const ACE_TCHAR* opt = arg_shifter.get_current (); 00207 if (ACE_OS::strcasecmp (opt, ACE_TEXT("null")) == 0) 00208 this->observer_ = 0; 00209 else if (ACE_OS::strcasecmp (opt, ACE_TEXT("basic")) == 0) 00210 this->observer_ = 1; 00211 else if (ACE_OS::strcasecmp (opt, ACE_TEXT("reactive")) == 0) 00212 this->observer_ = 2; 00213 else 00214 this->unsupported_option_value ("-ECObserver", opt); 00215 arg_shifter.consume_arg (); 00216 } 00217 } 00218 00219 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECScheduling")) == 0) 00220 { 00221 arg_shifter.consume_arg (); 00222 00223 if (arg_shifter.is_parameter_next ()) 00224 { 00225 const ACE_TCHAR* opt = arg_shifter.get_current (); 00226 if (ACE_OS::strcasecmp (opt, ACE_TEXT("null")) == 0) 00227 this->scheduling_ = 0; 00228 else if (ACE_OS::strcasecmp (opt, ACE_TEXT("group")) == 0) 00229 this->scheduling_ = 1; 00230 else 00231 this->unsupported_option_value ("-ECScheduling", opt); 00232 arg_shifter.consume_arg (); 00233 } 00234 } 00235 00236 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECProxyPushConsumerCollection")) == 0) 00237 { 00238 arg_shifter.consume_arg (); 00239 00240 if (arg_shifter.is_parameter_next ()) 00241 { 00242 const ACE_TCHAR *current_arg = arg_shifter.get_current (); 00243 ACE_TCHAR *opt = ACE_OS::strdup (current_arg); 00244 int collection_type = 0; 00245 int synch_type = 0; 00246 int iteration_type = 0; 00247 00248 ACE_TCHAR* aux; 00249 for (ACE_TCHAR* arg = ACE_OS::strtok_r (opt, ACE_TEXT(":"), &aux); 00250 arg != 0; 00251 arg = ACE_OS::strtok_r (0, ACE_TEXT(":"), &aux)) 00252 { 00253 if (ACE_OS::strcasecmp (arg, ACE_TEXT("mt")) == 0) 00254 synch_type = 0; 00255 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("st")) == 0) 00256 synch_type = 1; 00257 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("list")) == 0) 00258 collection_type = 0; 00259 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("rb_tree")) == 0) 00260 collection_type = 1; 00261 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("immediate")) == 0) 00262 iteration_type = 0; 00263 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("copy_on_read")) == 0) 00264 iteration_type = 1; 00265 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("copy_on_write")) == 0) 00266 iteration_type = 2; 00267 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("delayed")) == 0) 00268 iteration_type = 3; 00269 else 00270 ACE_ERROR ((LM_ERROR, 00271 "EC_Default_Factory - " 00272 "Unknown consumer collection modifier <%s>.\n", arg)); 00273 } 00274 ACE_OS::free (opt); 00275 this->consumer_collection_ = 00276 (synch_type << 8) |(collection_type << 4) | iteration_type; 00277 arg_shifter.consume_arg (); 00278 } 00279 } 00280 00281 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECProxyPushSupplierCollection")) == 0) 00282 { 00283 arg_shifter.consume_arg (); 00284 00285 if (arg_shifter.is_parameter_next ()) 00286 { 00287 const ACE_TCHAR* current_arg = arg_shifter.get_current(); 00288 ACE_TCHAR* opt = ACE_OS::strdup(current_arg); 00289 int collection_type = 0; 00290 int synch_type = 0; 00291 int iteration_type = 0; 00292 00293 ACE_TCHAR* aux; 00294 for (ACE_TCHAR* arg = ACE_OS::strtok_r (opt, ACE_TEXT(":"), &aux); 00295 arg != 0; 00296 arg = ACE_OS::strtok_r (0, ACE_TEXT(":"), &aux)) 00297 { 00298 if (ACE_OS::strcasecmp (arg, ACE_TEXT("mt")) == 0) 00299 synch_type = 0; 00300 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("st")) == 0) 00301 synch_type = 1; 00302 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("list")) == 0) 00303 collection_type = 0; 00304 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("rb_tree")) == 0) 00305 collection_type = 1; 00306 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("immediate")) == 0) 00307 iteration_type = 0; 00308 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("copy_on_read")) == 0) 00309 iteration_type = 1; 00310 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("copy_on_write")) == 0) 00311 iteration_type = 2; 00312 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("delayed")) == 0) 00313 iteration_type = 3; 00314 else 00315 ACE_ERROR ((LM_ERROR, 00316 "EC_Default_Factory - " 00317 "Unknown supplier collection modifier <%s>.\n", arg)); 00318 } 00319 ACE_OS::free(opt); 00320 this->supplier_collection_ = 00321 (synch_type << 8) | (collection_type << 4) | iteration_type; 00322 arg_shifter.consume_arg (); 00323 } 00324 } 00325 00326 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECProxyConsumerLock")) == 0) 00327 { 00328 arg_shifter.consume_arg (); 00329 00330 if (arg_shifter.is_parameter_next ()) 00331 { 00332 const ACE_TCHAR* opt = arg_shifter.get_current (); 00333 if (ACE_OS::strcasecmp (opt, ACE_TEXT("null")) == 0) 00334 this->consumer_lock_ = 0; 00335 else if (ACE_OS::strcasecmp (opt, ACE_TEXT("thread")) == 0) 00336 this->consumer_lock_ = 1; 00337 else if (ACE_OS::strcasecmp (opt, ACE_TEXT("recursive")) == 0) 00338 this->consumer_lock_ = 2; 00339 else 00340 this->unsupported_option_value ("-ECProxyConsumerLock", opt); 00341 arg_shifter.consume_arg (); 00342 } 00343 } 00344 00345 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECProxySupplierLock")) == 0) 00346 { 00347 arg_shifter.consume_arg (); 00348 00349 if (arg_shifter.is_parameter_next ()) 00350 { 00351 const ACE_TCHAR* opt = arg_shifter.get_current (); 00352 if (ACE_OS::strcasecmp (opt, ACE_TEXT("null")) == 0) 00353 this->supplier_lock_ = 0; 00354 else if (ACE_OS::strcasecmp (opt, ACE_TEXT("thread")) == 0) 00355 this->supplier_lock_ = 1; 00356 else if (ACE_OS::strcasecmp (opt, ACE_TEXT("recursive")) == 0) 00357 this->supplier_lock_ = 2; 00358 else 00359 this->unsupported_option_value ("-ECProxySupplierLock", opt); 00360 arg_shifter.consume_arg (); 00361 } 00362 } 00363 00364 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECUseORBId")) == 0) 00365 { 00366 arg_shifter.consume_arg (); 00367 00368 if (arg_shifter.is_parameter_next ()) 00369 { 00370 // Save argument for later use 00371 this->orbid_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ()); 00372 arg_shifter.consume_arg (); 00373 } 00374 } 00375 00376 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECConsumerControl")) == 0) 00377 { 00378 arg_shifter.consume_arg (); 00379 00380 if (arg_shifter.is_parameter_next ()) 00381 { 00382 const ACE_TCHAR* opt = arg_shifter.get_current (); 00383 if (ACE_OS::strcasecmp (opt, ACE_TEXT("null")) == 0) 00384 this->consumer_control_ = 0; 00385 else if (ACE_OS::strcasecmp (opt, ACE_TEXT("reactive")) == 0) 00386 this->consumer_control_ = 1; 00387 else 00388 this->unsupported_option_value ("-ECConsumerControl", opt); 00389 arg_shifter.consume_arg (); 00390 } 00391 } 00392 00393 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECSupplierControl")) == 0) 00394 { 00395 arg_shifter.consume_arg (); 00396 00397 if (arg_shifter.is_parameter_next ()) 00398 { 00399 const ACE_TCHAR* opt = arg_shifter.get_current (); 00400 if (ACE_OS::strcasecmp (opt, ACE_TEXT("null")) == 0) 00401 this->supplier_control_ = 0; 00402 else if (ACE_OS::strcasecmp (opt, ACE_TEXT("reactive")) == 0) 00403 this->supplier_control_ = 1; 00404 else 00405 this->unsupported_option_value ("-ECSupplierControl", opt); 00406 arg_shifter.consume_arg (); 00407 } 00408 } 00409 00410 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECConsumerControlPeriod")) == 0) 00411 { 00412 arg_shifter.consume_arg (); 00413 00414 if (arg_shifter.is_parameter_next ()) 00415 { 00416 const ACE_TCHAR* opt = arg_shifter.get_current (); 00417 this->consumer_control_period_ = ACE_OS::atoi (opt); 00418 arg_shifter.consume_arg (); 00419 } 00420 } 00421 00422 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECSupplierControlPeriod")) == 0) 00423 { 00424 arg_shifter.consume_arg (); 00425 00426 if (arg_shifter.is_parameter_next ()) 00427 { 00428 const ACE_TCHAR* opt = arg_shifter.get_current (); 00429 this->supplier_control_period_ = ACE_OS::atoi (opt); 00430 arg_shifter.consume_arg (); 00431 } 00432 } 00433 00434 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECConsumerControlTimeout")) == 0) 00435 { 00436 arg_shifter.consume_arg (); 00437 00438 if (arg_shifter.is_parameter_next ()) 00439 { 00440 const ACE_TCHAR* opt = arg_shifter.get_current (); 00441 unsigned long timeout = ACE_OS::strtoul(opt, 0, 10); 00442 this->consumer_control_timeout_.usec(timeout); 00443 arg_shifter.consume_arg (); 00444 } 00445 } 00446 00447 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECSupplierControlTimeout")) == 0) 00448 { 00449 arg_shifter.consume_arg (); 00450 00451 if (arg_shifter.is_parameter_next ()) 00452 { 00453 const ACE_TCHAR* opt = arg_shifter.get_current (); 00454 unsigned long timeout = ACE_OS::strtoul(opt, 0, 10); 00455 this->supplier_control_timeout_.usec(timeout); 00456 arg_shifter.consume_arg (); 00457 } 00458 } 00459 00460 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECConsumerValidateConnection")) == 0) 00461 { 00462 arg_shifter.consume_arg (); 00463 00464 if (arg_shifter.is_parameter_next ()) 00465 { 00466 const ACE_TCHAR* opt = arg_shifter.get_current (); 00467 this->consumer_validate_connection_ = ACE_OS::atoi (opt); 00468 arg_shifter.consume_arg (); 00469 } 00470 } 00471 00472 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECPushSupplierSet")) == 0) 00473 { 00474 ACE_ERROR ((LM_ERROR, 00475 "EC_Default_Factory - " 00476 "obsolete option <%s>, ignored\n", arg)); 00477 arg_shifter.consume_arg (); 00478 } 00479 00480 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECQueueFullServiceObject")) == 0) 00481 { 00482 arg_shifter.consume_arg (); 00483 if (arg_shifter.is_parameter_next ()) 00484 { 00485 const char* opt = arg_shifter.get_current (); 00486 this->queue_full_service_object_name_.set(opt); 00487 arg_shifter.consume_arg (); 00488 } 00489 } 00490 00491 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECConsumerAdminLock")) == 0) 00492 { 00493 ACE_ERROR ((LM_ERROR, 00494 "EC_Default_Factory - " 00495 "obsolete option <%s>, ignored\n", arg)); 00496 arg_shifter.consume_arg (); 00497 } 00498 00499 else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-ECSupplierAdminLock")) == 0) 00500 { 00501 ACE_ERROR ((LM_ERROR, 00502 "EC_Default_Factory - " 00503 "obsolete option <%s>, ignored\n", arg)); 00504 arg_shifter.consume_arg (); 00505 } 00506 00507 else if (ACE_OS::strncmp (arg, ACE_TEXT("-EC"), 3) == 0) 00508 { 00509 arg_shifter.consume_arg (); 00510 ACE_ERROR ((LM_ERROR, 00511 "EC_Default_Factory - " 00512 "unknown option <%s>\n", 00513 arg)); 00514 } 00515 else 00516 { 00517 arg_shifter.consume_arg (); 00518 ACE_DEBUG ((LM_DEBUG, 00519 "EC_Default_Factory - " 00520 "ignoring option <%s>\n", 00521 arg)); 00522 } 00523 } 00524 return 0; 00525 }
int TAO_EC_Default_Factory::init_svcs | ( | void | ) | [static] |
Helper function to register the default factory into the service configurator.
Reimplemented in TAO_EC_Kokyu_Factory, and TAO_EC_TPC_Factory.
Definition at line 51 of file EC_Default_Factory.cpp.
References TAO_EC_Simple_Queue_Full_Action::init_svcs(), and ACE_Service_Config::static_svcs().
00052 { 00053 TAO_EC_Simple_Queue_Full_Action::init_svcs(); 00054 return ACE_Service_Config::static_svcs ()-> 00055 insert (&ace_svc_desc_TAO_EC_Default_Factory); 00056 }
ACE_INLINE const ACE_CString & TAO_EC_Default_Factory::orb_id | ( | void | ) | const |
Accessor to ORBid.
Definition at line 54 of file EC_Default_Factory.inl.
References orbid_.
00055 { 00056 return this->orbid_; 00057 }
ACE_INLINE int TAO_EC_Default_Factory::supplier_collection | ( | void | ) | const |
Accessors to supplier collection flags.
Definition at line 42 of file EC_Default_Factory.inl.
References supplier_collection_.
00043 { 00044 return this->supplier_collection_; 00045 }
ACE_INLINE int TAO_EC_Default_Factory::supplier_filtering | ( | void | ) | const |
Accessors to supplier filtering flags.
Definition at line 48 of file EC_Default_Factory.inl.
References supplier_filtering_.
00049 { 00050 return this->supplier_filtering_; 00051 }
void TAO_EC_Default_Factory::unsupported_option_value | ( | const char * | option_name, | |
const char * | option_value | |||
) | [protected] |
Helper for agrument parsing. Prints out an error message about unsupported option value.
Definition at line 59 of file EC_Default_Factory.cpp.
References ACE_ERROR, and LM_ERROR.
Referenced by init().
00061 { 00062 ACE_ERROR ((LM_ERROR, 00063 "EC_Default_Factory - " 00064 "Unsupported <%s> option value: <%s>. " 00065 "Ignoring this option - using defaults instead.\n", 00066 option_name, 00067 option_value)); 00068 }
int TAO_EC_Default_Factory::consumer_collection_ [protected] |
Definition at line 154 of file EC_Default_Factory.h.
Referenced by consumer_collection(), and init().
int TAO_EC_Default_Factory::consumer_control_ [protected] |
The consumer and supplier control policies.
Definition at line 172 of file EC_Default_Factory.h.
Referenced by init().
int TAO_EC_Default_Factory::consumer_control_period_ [protected] |
The consumer and supplier control periods in usecs.
Definition at line 176 of file EC_Default_Factory.h.
Referenced by init().
The consumer control timeout in usecs.
Definition at line 180 of file EC_Default_Factory.h.
Referenced by create_consumer_control(), and init().
int TAO_EC_Default_Factory::consumer_lock_ [protected] |
int TAO_EC_Default_Factory::consumer_validate_connection_ [protected] |
Validate the connection to consumer on connect.
Definition at line 186 of file EC_Default_Factory.h.
Referenced by create_proxy_push_supplier(), and init().
int TAO_EC_Default_Factory::dispatching_ [protected] |
Several flags to control the kind of object created.
Definition at line 148 of file EC_Default_Factory.h.
Referenced by TAO_EC_Sched_Factory::init(), TAO_EC_Kokyu_Factory::init(), and init().
int TAO_EC_Default_Factory::dispatching_threads_ [protected] |
Flags used by thread-based dispatching strategies.
Definition at line 160 of file EC_Default_Factory.h.
Referenced by init().
int TAO_EC_Default_Factory::dispatching_threads_flags_ [protected] |
number of threads; may be ignored depending on strategy; default: TAO_EC_DEFAULT_DISPATCHING_THREADS
Definition at line 161 of file EC_Default_Factory.h.
Referenced by init().
int TAO_EC_Default_Factory::dispatching_threads_force_active_ [protected] |
dispatching thread priority; default: TAO_EC_DEFAULT_DISPATCHING_THREADS_PRIORITY
Definition at line 163 of file EC_Default_Factory.h.
int TAO_EC_Default_Factory::dispatching_threads_priority_ [protected] |
flags for thread creation; default: TAO_EC_DEFAULT_DISPATCHING_THREADS_FLAGS
Definition at line 162 of file EC_Default_Factory.h.
Referenced by init().
int TAO_EC_Default_Factory::filtering_ [protected] |
Definition at line 149 of file EC_Default_Factory.h.
Referenced by TAO_EC_Sched_Factory::init(), TAO_EC_Kokyu_Factory::init(), and init().
int TAO_EC_Default_Factory::observer_ [protected] |
ACE_CString TAO_EC_Default_Factory::orbid_ [protected] |
Use this ORB to locate global resources.
Definition at line 169 of file EC_Default_Factory.h.
Referenced by orb_id().
create threads with innocuous default values if creation with requested values fails
Definition at line 164 of file EC_Default_Factory.h.
Referenced by init().
int TAO_EC_Default_Factory::scheduling_ [protected] |
Definition at line 153 of file EC_Default_Factory.h.
Referenced by TAO_EC_Sched_Factory::init(), TAO_EC_Kokyu_Factory::init(), and init().
int TAO_EC_Default_Factory::supplier_collection_ [protected] |
Definition at line 155 of file EC_Default_Factory.h.
Referenced by init(), and supplier_collection().
int TAO_EC_Default_Factory::supplier_control_ [protected] |
int TAO_EC_Default_Factory::supplier_control_period_ [protected] |
The supplier control timeout in usecs.
Definition at line 183 of file EC_Default_Factory.h.
Referenced by create_supplier_control(), and init().
int TAO_EC_Default_Factory::supplier_filtering_ [protected] |
Definition at line 150 of file EC_Default_Factory.h.
Referenced by init(), and supplier_filtering().
int TAO_EC_Default_Factory::supplier_lock_ [protected] |
int TAO_EC_Default_Factory::timeout_ [protected] |
Definition at line 151 of file EC_Default_Factory.h.
Referenced by TAO_EC_Sched_Factory::init(), TAO_EC_Kokyu_Factory::init(), and init().