#include <Collocated_Object_Proxy_Broker.h>
Inheritance diagram for TAO::Collocated_Object_Proxy_Broker:
Public Member Functions | |
virtual CORBA::Boolean | _is_a (CORBA::Object_ptr target, const char *logical_type_id) |
virtual CORBA::Boolean | _non_existent (CORBA::Object_ptr target) |
virtual CORBA::InterfaceDef * | _get_interface (CORBA::Object_ptr target) |
virtual CORBA::Object_ptr | _get_component (CORBA::Object_ptr target) |
virtual char * | _repository_id (CORBA::Object_ptr target) |
A broker for standard CORBA::Object calls that needs to be made on remote objects.
Definition at line 41 of file Collocated_Object_Proxy_Broker.h.
CORBA::Object_ptr TAO::Collocated_Object_Proxy_Broker::_get_component | ( | CORBA::Object_ptr | target | ) | [virtual] |
Implements TAO::Object_Proxy_Broker.
Definition at line 134 of file Collocated_Object_Proxy_Broker.cpp.
References TAO_Abstract_ServantBase::_get_component(), TAO_ServantBase::_get_component(), CORBA::Object::_nil(), TAO_Pseudo_Var_T< T >::_retn(), CORBA::Object::_servant(), CORBA::Object::_stubobj(), TAO_Profile::object_key(), TAO_Pseudo_Var_T< T >::out(), TAO::Portable_Server::Servant_Upcall::prepare_for_upcall(), TAO_Stub::profile_in_use(), TAO::Portable_Server::Servant_Upcall::servant(), TAO_Stub::servant_orb_var(), and TAO_ORB_Core::THRU_POA.
00135 { 00136 CORBA::Object_var _tao_retval (CORBA::Object::_nil ()); 00137 00138 TAO_Stub *stub = target->_stubobj (); 00139 00140 try 00141 { 00142 // Which collocation strategy should we use? 00143 if (stub != 0 && 00144 stub->servant_orb_var ()->orb_core () 00145 ->get_collocation_strategy () == TAO_ORB_Core::THRU_POA) 00146 { 00147 TAO::Portable_Server::Servant_Upcall servant_upcall ( 00148 stub->servant_orb_var ()->orb_core ()); 00149 00150 CORBA::Object_var forward_to; 00151 servant_upcall.prepare_for_upcall ( 00152 stub->profile_in_use ()->object_key (), 00153 "_component", 00154 forward_to.out ()); 00155 00156 _tao_retval = servant_upcall.servant ()->_get_component (); 00157 } 00158 // Direct collocation strategy is used. 00159 else if (target->_servant () != 0) 00160 { 00161 _tao_retval = target->_servant ()->_get_component (); 00162 } 00163 } 00164 catch (const ::CORBA::OBJECT_NOT_EXIST&) 00165 { 00166 // Ignore this exception. 00167 } 00168 00169 return _tao_retval._retn (); 00170 }
CORBA::InterfaceDef_ptr TAO::Collocated_Object_Proxy_Broker::_get_interface | ( | CORBA::Object_ptr | target | ) | [virtual] |
Implements TAO::Object_Proxy_Broker.
Definition at line 173 of file Collocated_Object_Proxy_Broker.cpp.
References TAO_Abstract_ServantBase::_get_interface(), TAO_ServantBase::_get_interface(), CORBA::Object::_servant(), CORBA::Object::_stubobj(), TAO_Stub::object_key(), TAO_Pseudo_Var_T< T >::out(), TAO::Portable_Server::Servant_Upcall::pre_invoke_collocated_request(), TAO::Portable_Server::Servant_Upcall::prepare_for_upcall(), TAO::Portable_Server::Servant_Upcall::servant(), TAO_Stub::servant_orb_var(), and TAO_ORB_Core::THRU_POA.
00174 { 00175 CORBA::InterfaceDef_ptr _tao_retval = 0; 00176 00177 TAO_Stub *stub = target->_stubobj (); 00178 00179 try 00180 { 00181 // Which collocation strategy should we use? 00182 if (stub != 0 && 00183 stub->servant_orb_var ()->orb_core ()->get_collocation_strategy () 00184 == TAO_ORB_Core::THRU_POA) 00185 { 00186 TAO::Portable_Server::Servant_Upcall servant_upcall ( 00187 target->_stubobj ()->servant_orb_var ()->orb_core ()); 00188 00189 CORBA::Object_var forward_to; 00190 00191 servant_upcall.prepare_for_upcall ( 00192 target->_stubobj ()->object_key (), 00193 "_interface", 00194 forward_to.out ()); 00195 00196 servant_upcall.pre_invoke_collocated_request (); 00197 00198 _tao_retval = 00199 servant_upcall.servant ()->_get_interface (); 00200 } 00201 // Direct collocation strategy is used. 00202 else if (target->_servant () != 0) 00203 { 00204 _tao_retval = target->_servant ()->_get_interface (); 00205 } 00206 } 00207 catch (const ::CORBA::OBJECT_NOT_EXIST&) 00208 { 00209 // Ignore this exception. 00210 } 00211 00212 return _tao_retval; 00213 }
CORBA::Boolean TAO::Collocated_Object_Proxy_Broker::_is_a | ( | CORBA::Object_ptr | target, | |
const char * | logical_type_id | |||
) | [virtual] |
Please see the documentation in Object_Proxy_Broker.h for details.
Implements TAO::Object_Proxy_Broker.
Definition at line 23 of file Collocated_Object_Proxy_Broker.cpp.
References TAO_Abstract_ServantBase::_is_a(), TAO_ServantBase::_is_a(), CORBA::Object::_servant(), CORBA::Object::_stubobj(), TAO_Profile::object_key(), TAO_Pseudo_Var_T< T >::out(), TAO::Portable_Server::Servant_Upcall::pre_invoke_collocated_request(), TAO::Portable_Server::Servant_Upcall::prepare_for_upcall(), TAO_Stub::profile_in_use(), TAO::Portable_Server::Servant_Upcall::servant(), TAO_Stub::servant_orb_var(), and TAO_ORB_Core::THRU_POA.
00025 { 00026 TAO_Stub *stub = target->_stubobj (); 00027 00028 // Which collocation strategy should we use? 00029 if (stub != 0 && 00030 stub->servant_orb_var ()->orb_core ()->get_collocation_strategy () 00031 == TAO_ORB_Core::THRU_POA) 00032 { 00033 TAO::Portable_Server::Servant_Upcall servant_upcall ( 00034 stub->servant_orb_var ()->orb_core ()); 00035 00036 CORBA::Object_var forward_to; 00037 servant_upcall.prepare_for_upcall ( 00038 stub->profile_in_use ()->object_key (), 00039 "_is_a", 00040 forward_to.out ()); 00041 00042 servant_upcall.pre_invoke_collocated_request (); 00043 00044 return servant_upcall.servant ()->_is_a (type_id); 00045 } 00046 00047 // Direct collocation strategy is used. 00048 if (target->_servant () != 0) 00049 { 00050 return target->_servant ()->_is_a (type_id); 00051 } 00052 00053 return 0; 00054 }
CORBA::Boolean TAO::Collocated_Object_Proxy_Broker::_non_existent | ( | CORBA::Object_ptr | target | ) | [virtual] |
Implements TAO::Object_Proxy_Broker.
Definition at line 98 of file Collocated_Object_Proxy_Broker.cpp.
References TAO_Abstract_ServantBase::_non_existent(), TAO_ServantBase::_non_existent(), CORBA::Object::_servant(), CORBA::Object::_stubobj(), TAO_Stub::object_key(), TAO_Pseudo_Var_T< T >::out(), TAO::Portable_Server::Servant_Upcall::pre_invoke_collocated_request(), TAO::Portable_Server::Servant_Upcall::prepare_for_upcall(), TAO::Portable_Server::Servant_Upcall::servant(), TAO_Stub::servant_orb_var(), and TAO_ORB_Core::THRU_POA.
00099 { 00100 CORBA::Boolean _tao_retval = true; 00101 00102 TAO_Stub *stub = target->_stubobj (); 00103 00104 // Which collocation strategy should we use? 00105 if (stub != 0 && 00106 stub->servant_orb_var ()->orb_core () 00107 ->get_collocation_strategy () == TAO_ORB_Core::THRU_POA) 00108 { 00109 TAO::Portable_Server::Servant_Upcall servant_upcall ( 00110 target->_stubobj ()->servant_orb_var ()->orb_core ()); 00111 00112 CORBA::Object_var forward_to; 00113 00114 servant_upcall.prepare_for_upcall ( 00115 target->_stubobj ()->object_key (), 00116 "_non_existent", 00117 forward_to.out ()); 00118 00119 servant_upcall.pre_invoke_collocated_request (); 00120 00121 _tao_retval = servant_upcall.servant ()->_non_existent (); 00122 } 00123 // Direct collocation strategy is used. 00124 else if (target->_servant () != 0) 00125 { 00126 _tao_retval = target->_servant ()->_non_existent (); 00127 } 00128 00129 return _tao_retval; 00130 }
char * TAO::Collocated_Object_Proxy_Broker::_repository_id | ( | CORBA::Object_ptr | target | ) | [virtual] |
Implements TAO::Object_Proxy_Broker.
Definition at line 59 of file Collocated_Object_Proxy_Broker.cpp.
References TAO_Abstract_ServantBase::_repository_id(), TAO_ServantBase::_repository_id(), CORBA::Object::_servant(), CORBA::Object::_stubobj(), TAO_Profile::object_key(), TAO_Pseudo_Var_T< T >::out(), TAO::Portable_Server::Servant_Upcall::prepare_for_upcall(), TAO_Stub::profile_in_use(), TAO::Portable_Server::Servant_Upcall::servant(), TAO_Stub::servant_orb_var(), and TAO_ORB_Core::THRU_POA.
00060 { 00061 TAO_Stub *stub = target->_stubobj (); 00062 char * _tao_retval = 0; 00063 00064 try 00065 { 00066 // Which collocation strategy should we use? 00067 if (stub != 0 && 00068 stub->servant_orb_var ()->orb_core () 00069 ->get_collocation_strategy () == TAO_ORB_Core::THRU_POA) 00070 { 00071 TAO::Portable_Server::Servant_Upcall servant_upcall ( 00072 stub->servant_orb_var ()->orb_core ()); 00073 00074 CORBA::Object_var forward_to; 00075 servant_upcall.prepare_for_upcall ( 00076 stub->profile_in_use ()->object_key (), 00077 "_repository_id", 00078 forward_to.out ()); 00079 00080 _tao_retval = 00081 servant_upcall.servant ()->_repository_id (); 00082 } 00083 // Direct collocation strategy is used. 00084 else if (target->_servant () != 0) 00085 { 00086 _tao_retval = target->_servant ()->_repository_id (); 00087 } 00088 } 00089 catch (const ::CORBA::OBJECT_NOT_EXIST&) 00090 { 00091 // Ignore this exception. 00092 } 00093 00094 return _tao_retval; 00095 }