#include <OC_Endpoint_Selector_Factory.h>
Inheritance diagram for TAO_OC_Endpoint_Selector_Factory:


Public Member Functions | |
| TAO_OC_Endpoint_Selector_Factory (void) | |
| Constructor. | |
| virtual | ~TAO_OC_Endpoint_Selector_Factory (void) |
| Destructor. | |
| virtual int | init (int argc, ACE_TCHAR *argv[]) |
| virtual TAO_Invocation_Endpoint_Selector * | get_selector () |
Protected Attributes | |
| TAO_Optimized_Connection_Endpoint_Selector * | oc_endpoint_selector_ |
Used by Invocation classes to intialize its endpoint selection strategy and state based on the effective policies. Endpoint selection strategies are stateless objects - all the state they need is contained by Invocation in . Thus, rather than allocating an endpoint selection strategy object for each Invocation, the factory simply returns the appropriate one from the set preallocated in the ORB_Core. One endpoint selection strategy object can be used by many invocations concurrently.
Definition at line 54 of file OC_Endpoint_Selector_Factory.h.
|
|
Constructor.
Definition at line 15 of file OC_Endpoint_Selector_Factory.cpp.
00016 : oc_endpoint_selector_(0) 00017 { 00018 } |
|
|
Destructor.
Definition at line 20 of file OC_Endpoint_Selector_Factory.cpp. References oc_endpoint_selector_.
00021 {
00022 delete this->oc_endpoint_selector_;
00023 }
|
|
|
Get an Invocation's endpoint selection strategy and initialize the endpoint selection state instance. Implements TAO_Endpoint_Selector_Factory. Definition at line 51 of file OC_Endpoint_Selector_Factory.cpp. References oc_endpoint_selector_.
00052 {
00053 // Trivial endpoint selector. Just return the default selector.
00054 return this->oc_endpoint_selector_;
00055 }
|
|
||||||||||||
|
Reimplemented from ACE_Shared_Object. Definition at line 26 of file OC_Endpoint_Selector_Factory.cpp. References ACE_NEW_RETURN, ACE_TEXT, ACE_Time_Value::msec(), TAO_ORB_Core::set_endpoint_selector_factory(), ACE_OS::strcasecmp(), and ACE_OS::strtol().
00027 {
00028 ACE_Time_Value timeout(0,0);
00029
00030 TAO_ORB_Core::set_endpoint_selector_factory ("OC_Endpoint_Selector_Factory");
00031 for (int count = 0; count < argc; count++)
00032 {
00033 if ((ACE_OS::strcasecmp (argv[count],
00034 ACE_TEXT ("-connect_timeout")) == 0) &&
00035 count < argc-1)
00036 {
00037 count++;
00038 long ms = ACE_OS::strtol(argv[count],0,10);
00039 timeout.msec (ms);
00040 }
00041 }
00042
00043 ACE_NEW_RETURN (this->oc_endpoint_selector_,
00044 TAO_Optimized_Connection_Endpoint_Selector(timeout),
00045 -1);
00046 return 0;
00047 }
|
|
|
The possible endpoint selector strategies that can be returned by this factory Definition at line 76 of file OC_Endpoint_Selector_Factory.h. Referenced by get_selector(), and ~TAO_OC_Endpoint_Selector_Factory(). |
1.3.6