TAO_ORB_Core_Static_Resources Class Reference

The static (global) resoures of all ORB cores. More...

#include <ORB_Core.h>

Inheritance diagram for TAO_ORB_Core_Static_Resources:

Inheritance graph
[legend]
Collaboration diagram for TAO_ORB_Core_Static_Resources:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_ORB_Core_Static_Resources (void)
 Constructor.

TAO_ORB_Core_Static_Resourcesoperator= (const TAO_ORB_Core_Static_Resources &)

Static Public Member Functions

TAO_ORB_Core_Static_Resourcesinstance (void)
 Return the context-specific singleton instance.


Public Attributes

TAO_ORB_Core::Sync_Scope_Hook sync_scope_hook_
ACE_CString protocols_hooks_name_
TAO_ORB_Core::Timeout_Hook timeout_hook_
 The hook to be set for the RelativeRoundtripTimeoutPolicy.

TAO_ORB_Core::Timeout_Hook connection_timeout_hook_
 The hook to be set for the ConnectionTimeoutPolicy.

ACE_CString endpoint_selector_factory_name_
ACE_CString thread_lane_resources_manager_factory_name_
ACE_CString collocation_resolver_name_
ACE_CString stub_factory_name_
ACE_CString resource_factory_name_
ACE_CString dynamic_adapter_name_
ACE_CString ifr_client_adapter_name_
ACE_CString typecodefactory_adapter_name_
ACE_CString iorinterceptor_adapter_factory_name_
ACE_CString valuetype_adapter_factory_name_
ACE_CString poa_factory_name_
ACE_CString poa_factory_directive_
TAO_ORB_Core::Timeout_Hook alt_connection_timeout_hook_
 An alternative hook to be set for the ConnectionTimeoutPolicy.


Static Private Attributes

TAO_ORB_Core_Static_Resourcesinitialization_reference_
 The singleton instance.


Detailed Description

The static (global) resoures of all ORB cores.

This class is used by the ORB_Core to store the resources global to all ORB_Cores. All instance variables that would have been declared "static" in TAO_ORB_Core, should be declared in this class to avoid the "static initialization order fiasco" as described in http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.11. Briefly, this is the problem that occurs if any static initializers in any other code call into set static members of TAO_ORB_Core. Since the order in which these initializers execute is unspecified, uninitialized members can be accessed.

Definition at line 1288 of file ORB_Core.h.


Constructor & Destructor Documentation

TAO_ORB_Core_Static_Resources::TAO_ORB_Core_Static_Resources void   ) 
 

Constructor.

Definition at line 147 of file ORB_Core.cpp.

References ACE_DYNAMIC_SERVICE_DIRECTIVE, and ACE_TEXT_ALWAYS_CHAR.

00148   : sync_scope_hook_ (0),
00149     protocols_hooks_name_ ("Protocols_Hooks"),
00150     timeout_hook_ (0),
00151     connection_timeout_hook_ (0),
00152     endpoint_selector_factory_name_ ("Default_Endpoint_Selector_Factory"),
00153     thread_lane_resources_manager_factory_name_
00154       ("Default_Thread_Lane_Resources_Manager_Factory"),
00155 
00156     collocation_resolver_name_ ("Default_Collocation_Resolver"),
00157     stub_factory_name_ ("Default_Stub_Factory"),
00158     resource_factory_name_ ("Resource_Factory"),
00159     dynamic_adapter_name_ ("Dynamic_Adapter"),
00160     ifr_client_adapter_name_ ("IFR_Client_Adapter"),
00161     typecodefactory_adapter_name_ ("TypeCodeFactory_Adapter"),
00162     iorinterceptor_adapter_factory_name_ ("IORInterceptor_Adapter_Factory"),
00163     valuetype_adapter_factory_name_ ("Valuetype_Adapter_Factory"),
00164     poa_factory_name_ ("TAO_Object_Adapter_Factory"),
00165     poa_factory_directive_
00166       (ACE_TEXT_ALWAYS_CHAR
00167         (ACE_DYNAMIC_SERVICE_DIRECTIVE("TAO_Object_Adapter_Factory",
00168                                        "TAO_PortableServer",
00169                                        "_make_TAO_Object_Adapter_Factory",
00170                                        ""))),
00171     alt_connection_timeout_hook_ (0)
00172 {
00173 }


Member Function Documentation

TAO_ORB_Core_Static_Resources * TAO_ORB_Core_Static_Resources::instance void   )  [static]
 

Return the context-specific singleton instance.

Definition at line 115 of file ORB_Core.cpp.

References ACE_Service_Config::current(), and ACE_Service_Config::global().

Referenced by TAO_ORB_Core::call_sync_scope_hook(), TAO_ORB_Core::call_timeout_hook(), TAO_ORB_Core::collocation_resolver(), TAO_ORB_Core::connection_timeout(), TAO_ORB_Core::dynamic_adapter_name(), TAO_ORB_Core::endpoint_selector_factory(), TAO_ORB_Core::ifr_client_adapter_name(), TAO_ORB_Core::iorinterceptor_adapter_factory_name(), TAO_ORB_Core::poa_factory_name(), TAO_ORB_Core::resource_factory(), TAO_ORB_Core::root_poa(), TAO_ORB_Core::set_collocation_resolver(), TAO_ORB_Core::set_endpoint_selector_factory(), TAO_ORB_Core::set_poa_factory(), TAO_ORB_Core::set_protocols_hooks(), TAO_ORB_Core::set_resource_factory(), TAO_ORB_Core::set_stub_factory(), TAO_ORB_Core::set_sync_scope_hook(), TAO_ORB_Core::set_thread_lane_resources_manager_factory(), TAO_ORB_Core::set_timeout_hook(), TAO_ORB_Core::stub_factory(), TAO_ORB_Core::thread_lane_resources_manager(), TAO_ORB_Core::typecodefactory_adapter_name(), and TAO_ORB_Core::valuetype_adapter_factory_name().

00116 {
00117   ACE_Service_Gestalt *current = ACE_Service_Config::current();
00118   TAO_ORB_Core_Static_Resources* tocsr =
00119     ACE_Dynamic_Service<TAO_ORB_Core_Static_Resources>::instance
00120     (current,"TAO_ORB_Core_Static_Resources",true);
00121 
00122   if (tocsr == 0)
00123     {
00124       // This new is never freed on purpose.  The data specified by
00125       // it needs to be around for the last shared library that references
00126       // this class.  This could occur in a destructor in a shared library
00127       // that is unloaded after this one.  One solution to avoid this
00128       // harmless memory leak would be to use reference counting.
00129       current->process_directive(ace_svc_desc_TAO_ORB_Core_Static_Resources);
00130       tocsr = ACE_Dynamic_Service<TAO_ORB_Core_Static_Resources>::instance
00131         (current,"TAO_ORB_Core_Static_Resources",true);
00132 
00133       ACE_Service_Gestalt *global = ACE_Service_Config::global();
00134       if (current != global)
00135         {
00136           TAO_ORB_Core_Static_Resources* global_tocsr =
00137             ACE_Dynamic_Service<TAO_ORB_Core_Static_Resources>::instance
00138             (global,"TAO_ORB_Core_Static_Resources");
00139           *tocsr = *global_tocsr;
00140         }
00141     }
00142 
00143   //  return TAO_ORB_Core_Static_Resources::instance_;
00144   return tocsr;
00145 }

TAO_ORB_Core_Static_Resources & TAO_ORB_Core_Static_Resources::operator= const TAO_ORB_Core_Static_Resources  ) 
 

Definition at line 176 of file ORB_Core.cpp.

References alt_connection_timeout_hook_, collocation_resolver_name_, connection_timeout_hook_, dynamic_adapter_name_, endpoint_selector_factory_name_, ifr_client_adapter_name_, iorinterceptor_adapter_factory_name_, poa_factory_directive_, poa_factory_name_, protocols_hooks_name_, resource_factory_name_, stub_factory_name_, sync_scope_hook_, thread_lane_resources_manager_factory_name_, timeout_hook_, typecodefactory_adapter_name_, and valuetype_adapter_factory_name_.


Member Data Documentation

TAO_ORB_Core::Timeout_Hook TAO_ORB_Core_Static_Resources::alt_connection_timeout_hook_
 

An alternative hook to be set for the ConnectionTimeoutPolicy.

Definition at line 1414 of file ORB_Core.h.

Referenced by TAO_ORB_Core::connection_timeout(), and operator=().

ACE_CString TAO_ORB_Core_Static_Resources::collocation_resolver_name_
 

Name of the collocation resolver that needs to be instantiated. The default value is "Default_Collocation_Resolver". If TAO_RTCORBA is linked, the set_collocation_resolver will be called to set the value to be "RT_Collocation_Resolver".

Definition at line 1336 of file ORB_Core.h.

Referenced by TAO_ORB_Core::collocation_resolver(), operator=(), and TAO_ORB_Core::set_collocation_resolver().

TAO_ORB_Core::Timeout_Hook TAO_ORB_Core_Static_Resources::connection_timeout_hook_
 

The hook to be set for the ConnectionTimeoutPolicy.

Definition at line 1310 of file ORB_Core.h.

Referenced by TAO_ORB_Core::connection_timeout(), and operator=().

ACE_CString TAO_ORB_Core_Static_Resources::dynamic_adapter_name_
 

Name of the service object for DII request creation that needs to be instantiated. The default value is "Dynamic_Adaper". If TAO_DynamicInterface is linked, dynamic_adapter_name() will be called to set the value to "Concrete_Dynamic_Adapter".

Definition at line 1360 of file ORB_Core.h.

Referenced by TAO_ORB_Core::dynamic_adapter_name(), and operator=().

ACE_CString TAO_ORB_Core_Static_Resources::endpoint_selector_factory_name_
 

Name of the endpoint selector factory that needs to be instantiated. The default value is "Default_Endpoint_Selector_Factory". If TAO_RTCORBA is linked, the set_endpoint_selector_factory will be called to set the value to be "RT_Endpoint_Selector_Factory".

Definition at line 1318 of file ORB_Core.h.

Referenced by TAO_ORB_Core::endpoint_selector_factory(), operator=(), and TAO_ORB_Core::set_endpoint_selector_factory().

ACE_CString TAO_ORB_Core_Static_Resources::ifr_client_adapter_name_
 

Name of the service object for functions that make calls on the Interface Repository. The default value is "IFR_Client_Adaper". If TAO_IFR_CLient is linked, ifr_client_adapter_name() will be called to set the value to "Concrete_IFR_Client_Adapter".

Definition at line 1368 of file ORB_Core.h.

Referenced by TAO_ORB_Core::ifr_client_adapter_name(), and operator=().

TAO_ORB_Core_Static_Resources * TAO_ORB_Core_Static_Resources::initialization_reference_ [static, private]
 

Initial value:

The singleton instance.

Mostly unused variable whose sole purpose is to enforce the instantiation of a TAO_ORB_Core_Static_Resources instance at initialization time.

Definition at line 111 of file ORB_Core.cpp.

ACE_CString TAO_ORB_Core_Static_Resources::iorinterceptor_adapter_factory_name_
 

Name of the factory object used to adapt function calls on the PortableInterceptor interfaces IORInfo and IORInterceptor. The default value is "IORInterceptor_Adapter_Factory". If the IORInterceptor library is linked, the corresponding accessor function iorinterceptor_adapter_factory_name() will be called to set the value to "Concrete_IORInterceptor_Adapter_Factory".

Definition at line 1387 of file ORB_Core.h.

Referenced by TAO_ORB_Core::iorinterceptor_adapter_factory_name(), and operator=().

ACE_CString TAO_ORB_Core_Static_Resources::poa_factory_directive_
 

The service configurator directive used to load poa_factory_name_ dynamically.

Definition at line 1411 of file ORB_Core.h.

Referenced by operator=(), TAO_ORB_Core::root_poa(), and TAO_ORB_Core::set_poa_factory().

ACE_CString TAO_ORB_Core_Static_Resources::poa_factory_name_
 

Name of the service object used to create the RootPOA. The default value is "TAO_POA". If TAO_RTCORBA is loaded, this will be changed to TAO_RT_POA so that a POA equipped with realtime extensions will be returned.

Definition at line 1405 of file ORB_Core.h.

Referenced by operator=(), TAO_ORB_Core::poa_factory_name(), TAO_ORB_Core::root_poa(), and TAO_ORB_Core::set_poa_factory().

ACE_CString TAO_ORB_Core_Static_Resources::protocols_hooks_name_
 

Name of the protocols_hooks that needs to be instantiated. The default value is "Protocols_Hooks". If RTCORBA option is set, its value will be set to be "RT_Protocols_Hooks".

Definition at line 1304 of file ORB_Core.h.

Referenced by operator=(), and TAO_ORB_Core::set_protocols_hooks().

ACE_CString TAO_ORB_Core_Static_Resources::resource_factory_name_
 

Name of the resource factory that needs to be instantiated. The default value is "Resource_Factory". If TAO_Strategies is linked, the set_resource_factory will be called to set the value to be "Advanced_Resource_Factory".

Definition at line 1352 of file ORB_Core.h.

Referenced by operator=(), TAO_ORB_Core::resource_factory(), and TAO_ORB_Core::set_resource_factory().

ACE_CString TAO_ORB_Core_Static_Resources::stub_factory_name_
 

Name of the stub factory that needs to be instantiated. The default value is "Default_Stub_Factory". If TAO_RTCORBA is linked, the set_stub_factory will be called to set the value to be "RT_Stub_Factory".

Definition at line 1344 of file ORB_Core.h.

Referenced by operator=(), TAO_ORB_Core::set_stub_factory(), and TAO_ORB_Core::stub_factory().

TAO_ORB_Core::Sync_Scope_Hook TAO_ORB_Core_Static_Resources::sync_scope_hook_
 

Definition at line 1297 of file ORB_Core.h.

Referenced by TAO_ORB_Core::call_sync_scope_hook(), and operator=().

ACE_CString TAO_ORB_Core_Static_Resources::thread_lane_resources_manager_factory_name_
 

Name of the thread lane resources manager that needs to be instantiated. The default value is "Default_Thread_Lane_Resources_Manager_Factory". If TAO_RTCORBA is linked, the set_thread_lane_resources_manager will be called to set the value to be "RT_Thread_Lane_Resources_Manager_Factory".

Definition at line 1328 of file ORB_Core.h.

Referenced by operator=(), TAO_ORB_Core::set_thread_lane_resources_manager_factory(), and TAO_ORB_Core::thread_lane_resources_manager().

TAO_ORB_Core::Timeout_Hook TAO_ORB_Core_Static_Resources::timeout_hook_
 

The hook to be set for the RelativeRoundtripTimeoutPolicy.

Definition at line 1307 of file ORB_Core.h.

Referenced by TAO_ORB_Core::call_timeout_hook(), operator=(), and TAO_ORB_Core::set_timeout_hook().

ACE_CString TAO_ORB_Core_Static_Resources::typecodefactory_adapter_name_
 

Name of the service object used by the ORB create_*_tc functions. The default value is "TypeCodeFactory_Adapter". If the TypeCodeFactory library is linked, the corresponding accessor function typecodefactory_adapter_name() will be called to set the value to "Concrete_TypeCodeFactory_Adapter".

Definition at line 1377 of file ORB_Core.h.

Referenced by operator=(), and TAO_ORB_Core::typecodefactory_adapter_name().

ACE_CString TAO_ORB_Core_Static_Resources::valuetype_adapter_factory_name_
 

Name of the factory object used to adapt function calls on the valuetype-related interfaces. The default value is "Valuetype_Adapter_Factory". If the Valuetype library is linked, the corresponding accessor function valuetype_adapter_factory_name() will be called to set the value to "Concrete_Valuetype_Adapter_Factory".

Definition at line 1397 of file ORB_Core.h.

Referenced by operator=(), and TAO_ORB_Core::valuetype_adapter_factory_name().


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 12:22:50 2006 for TAO by doxygen 1.3.6