#include <EC_TPC_Factory.h>
Inheritance diagram for TAO_EC_TPC_Factory:
Public Member Functions | |
TAO_EC_TPC_Factory (void) | |
Constructor. | |
virtual | ~TAO_EC_TPC_Factory (void) |
destructor... | |
virtual int | init (int argc, char *argv[]) |
virtual TAO_EC_Dispatching * | create_dispatching (TAO_EC_Event_Channel_Base *) |
Create and destroy the dispatching module. | |
virtual TAO_EC_ProxyPushSupplier * | create_proxy_push_supplier (TAO_EC_Event_Channel_Base *) |
Create and destroy a ProxyPushSupplier. | |
virtual TAO_EC_ProxyPushConsumer * | create_proxy_push_consumer (TAO_EC_Event_Channel_Base *) |
Create and destroy a ProxyPushConsumer. | |
Static Public Member Functions | |
int | init_svcs (void) |
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 32 of file EC_TPC_Factory.h.
|
Constructor.
Definition at line 21 of file EC_TPC_Factory.cpp. References EC_TPC_debug_level.
00022 { 00023 EC_TPC_debug_level = 0; 00024 } |
|
destructor...
Definition at line 26 of file EC_TPC_Factory.cpp.
00027 { 00028 } |
|
Create and destroy the dispatching module.
Reimplemented from TAO_EC_Default_Factory. Definition at line 81 of file EC_TPC_Factory.cpp. References ACE_DEBUG, EC_TPC_debug_level, TAO_EC_Default_Factory::find_service_object(), LM_DEBUG, and TAO_EC_DEFAULT_QUEUE_FULL_SERVICE_OBJECT_NAME.
00082 { 00083 if (EC_TPC_debug_level > 0) 00084 ACE_DEBUG ((LM_DEBUG, "EC (%P|%t) EC_TPC_Factory::create_dispatching\n")); 00085 00086 TAO_EC_Queue_Full_Service_Object* so = 00087 this->find_service_object (this->queue_full_service_object_name_.fast_rep(), 00088 TAO_EC_DEFAULT_QUEUE_FULL_SERVICE_OBJECT_NAME); 00089 00090 return new TAO_EC_TPC_Dispatching (so); 00091 } |
|
Create and destroy a ProxyPushConsumer.
Reimplemented from TAO_EC_Default_Factory. Definition at line 104 of file EC_TPC_Factory.cpp. References ACE_DEBUG, EC_TPC_debug_level, and LM_DEBUG.
00105 { 00106 if (EC_TPC_debug_level > 0) 00107 ACE_DEBUG ((LM_DEBUG, "EC (%P|%t) EC_TPC_Factory::create_proxy_push_consumer\n")); 00108 return new TAO_EC_TPC_ProxyPushConsumer (ec); 00109 } |
|
Create and destroy a ProxyPushSupplier.
Reimplemented from TAO_EC_Default_Factory. Definition at line 95 of file EC_TPC_Factory.cpp. References ACE_DEBUG, EC_TPC_debug_level, and LM_DEBUG.
00096 { 00097 if (EC_TPC_debug_level > 0) 00098 ACE_DEBUG ((LM_DEBUG, "EC (%P|%t) EC_TPC_Factory::create_proxy_push_supplier\n")); 00099 return new TAO_EC_TPC_ProxyPushSupplier (ec, this->consumer_validate_connection_); 00100 } |
|
Definition at line 39 of file EC_TPC_Factory.cpp. References ACE_Arg_Shifter, ACE_DEBUG, EC_TPC_debug_level, TAO_EC_Default_Factory::init(), LM_ERROR, and ACE_OS::strcasecmp().
00040 { 00041 ACE_Arg_Shifter arg_shifter (argc, argv); 00042 00043 while (arg_shifter.is_anything_left ()) 00044 { 00045 const char *arg = arg_shifter.get_current (); 00046 00047 if (ACE_OS::strcasecmp (arg, "-ECDispatching") == 0) 00048 { 00049 arg_shifter.consume_arg (); 00050 00051 if (arg_shifter.is_parameter_next ()) 00052 { 00053 // Here we print out a message indicating that this 00054 // option isn't valid with this factory and that it's 00055 // being ignored. 00056 00057 ACE_DEBUG ((LM_ERROR, 00058 "EC_TPC_Factory - " 00059 "-ECDispatching not supported with TPC_Factory; ignoring the option and using thread-per-consumer dispatch strategy\n")); 00060 arg_shifter.consume_arg (); 00061 } 00062 } 00063 if (ACE_OS::strcasecmp (arg, "-ECTPCDebug") == 0) 00064 { 00065 arg_shifter.consume_arg (); 00066 ++EC_TPC_debug_level; 00067 } 00068 else 00069 { 00070 arg_shifter.ignore_arg (); 00071 } 00072 00073 } 00074 00075 return TAO_EC_Default_Factory::init (argc, argv); 00076 } |
|
Helper function to register the default factory into the service configurator. Reimplemented from TAO_EC_Default_Factory. Definition at line 31 of file EC_TPC_Factory.cpp. References TAO_EC_Simple_Queue_Full_Action::init_svcs(), and ACE_Service_Config::static_svcs().
00032 { 00033 TAO_EC_Simple_Queue_Full_Action::init_svcs(); 00034 return ACE_Service_Config::static_svcs ()-> 00035 insert (&ace_svc_desc_TAO_EC_TPC_Factory); 00036 } |