00001 // Connector_Impl.cpp,v 1.9 2005/11/02 07:13:02 ossama Exp 00002 00003 #ifndef TAO_CONNECTOR_IMPL_CPP 00004 #define TAO_CONNECTOR_IMPL_CPP 00005 00006 #include "tao/Connector_Impl.h" 00007 00008 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00009 # pragma once 00010 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00011 00012 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00013 00014 template <class SVC_HANDLER> 00015 TAO_Connect_Creation_Strategy<SVC_HANDLER>:: 00016 TAO_Connect_Creation_Strategy (ACE_Thread_Manager* t, 00017 TAO_ORB_Core *orb_core, 00018 CORBA::Boolean flag) 00019 : ACE_Creation_Strategy <SVC_HANDLER> (t), 00020 orb_core_ (orb_core), 00021 lite_flag_ (flag) 00022 { 00023 00024 } 00025 00026 template <class SVC_HANDLER> int 00027 TAO_Connect_Creation_Strategy<SVC_HANDLER>::make_svc_handler (SVC_HANDLER *&sh) 00028 { 00029 if (sh == 0) 00030 ACE_NEW_RETURN (sh, 00031 SVC_HANDLER (this->orb_core_, 00032 this->lite_flag_), 00033 -1); 00034 00035 // We add to the #REFCOUNT# since the Connector needs this. See 00036 // Connector::make_connection() for details. 00037 sh->add_reference (); 00038 00039 // At this point, the #REFCOUNT# is two. 00040 00041 return 0; 00042 } 00043 00044 00045 //////////////////////////////////////////////////////////////// 00046 00047 template <class SVC_HANDLER> 00048 TAO_Connect_Concurrency_Strategy<SVC_HANDLER>:: 00049 TAO_Connect_Concurrency_Strategy (TAO_ORB_Core *orb_core) 00050 : orb_core_ (orb_core) 00051 { 00052 } 00053 00054 template <class SVC_HANDLER> int 00055 TAO_Connect_Concurrency_Strategy<SVC_HANDLER>:: 00056 activate_svc_handler (SVC_HANDLER *sh, 00057 void *arg) 00058 { 00059 return ACE_Concurrency_Strategy<SVC_HANDLER>::activate_svc_handler (sh, 00060 arg); 00061 } 00062 00063 TAO_END_VERSIONED_NAMESPACE_DECL 00064 00065 #endif /* TAO_CONNECTOR_IMPL_CPP */