RT_Object_Adapter_Factory.cpp

Go to the documentation of this file.
00001 // RT_Object_Adapter_Factory.cpp,v 1.12 2006/03/10 07:19:16 jtc Exp
00002 
00003 #include "tao/RTPortableServer/RT_Object_Adapter_Factory.h"
00004 
00005 #if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
00006 
00007 #include "tao/PortableServer/Object_Adapter.h"
00008 #include "tao/ORB_Core.h"
00009 #include "tao/RTPortableServer/RT_Servant_Dispatcher.h"
00010 #include "tao/RTPortableServer/RT_Policy_Validator.h"
00011 #include "tao/RTPortableServer/RT_Collocation_Resolver.h"
00012 
00013 ACE_RCSID (RTPortableServer,
00014            RT_Object_Adapter_Factory,
00015            "RT_Object_Adapter_Factory.cpp,v 1.12 2006/03/10 07:19:16 jtc Exp")
00016 
00017 
00018 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00019 
00020 TAO_Adapter*
00021 TAO_RT_Object_Adapter_Factory::create (TAO_ORB_Core *orb_core)
00022 {
00023   if (!orb_core->orb_params ()->disable_rt_collocation_resolver ())
00024     {
00025       // Set the name of the collocation resolver to be RT_Collocation_Resolver.
00026       TAO_ORB_Core::set_collocation_resolver (
00027           "RT_Collocation_Resolver");
00028       ACE_Service_Config::process_directive (
00029           ace_svc_desc_TAO_RT_Collocation_Resolver);
00030     }
00031 
00032   TAO_Object_Adapter *object_adapter = 0;
00033   ACE_NEW_RETURN (object_adapter,
00034                   TAO_Object_Adapter (orb_core->server_factory ()->
00035                                         active_object_map_creation_parameters (),
00036                                       *orb_core),
00037                   0);
00038 
00039   // Create and register the RT servant dispatcher.
00040   TAO_RT_Servant_Dispatcher *rt_servant_dispatcher = 0;
00041   ACE_NEW_RETURN (rt_servant_dispatcher,
00042                   TAO_RT_Servant_Dispatcher,
00043                   0);
00044   object_adapter->servant_dispatcher (rt_servant_dispatcher);
00045 
00046   // Create and add the RT policy validator.
00047   TAO_POA_RT_Policy_Validator *rt_validator = 0;
00048   ACE_NEW_RETURN (rt_validator,
00049                   TAO_POA_RT_Policy_Validator (*orb_core),
00050                   0);
00051   object_adapter->validator ().add_validator (rt_validator);
00052 
00053   return object_adapter;
00054 }
00055 
00056 TAO_END_VERSIONED_NAMESPACE_DECL
00057 
00058 ACE_FACTORY_DEFINE (TAO_RTPortableServer, TAO_RT_Object_Adapter_Factory)
00059 ACE_STATIC_SVC_DEFINE (TAO_RT_Object_Adapter_Factory,
00060                        ACE_TEXT ("TAO_RT_Object_Adapter_Factory"),
00061                        ACE_SVC_OBJ_T,
00062                        &ACE_SVC_NAME (TAO_RT_Object_Adapter_Factory),
00063                        ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
00064                        0)
00065 
00066 #endif /* TAO_HAS_CORBA_MESSAGING && TAO_HAS_CORBA_MESSAGING != 0 */

Generated on Thu Nov 9 12:55:46 2006 for TAO_RTPortableServer by doxygen 1.3.6