#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.
|
Implements TAO::Object_Proxy_Broker. Definition at line 175 of file Collocated_Object_Proxy_Broker.cpp. References ACE_CATCH, ACE_CATCHANY, ACE_CHECK_RETURN, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_RE_THROW, ACE_TRY, ACE_TRY_CHECK, TAO_Profile::object_key(), TAO::Portable_Server::Servant_Upcall::prepare_for_upcall(), TAO_Stub::profile_in_use(), TAO::Portable_Server::Servant_Upcall::servant(), and TAO_Stub::servant_orb_var().
00177 { 00178 CORBA::Object_var _tao_retval (CORBA::Object::_nil ()); 00179 00180 TAO_Stub *stub = target->_stubobj (); 00181 00182 ACE_TRY 00183 { 00184 // Which collocation strategy should we use? 00185 if (stub != 0 && 00186 stub->servant_orb_var ()->orb_core () 00187 ->get_collocation_strategy () == TAO_ORB_Core::THRU_POA) 00188 { 00189 TAO::Portable_Server::Servant_Upcall servant_upcall ( 00190 stub->servant_orb_var ()->orb_core () 00191 ); 00192 00193 CORBA::Object_var forward_to; 00194 servant_upcall.prepare_for_upcall ( 00195 stub->profile_in_use ()->object_key (), 00196 "_component", 00197 forward_to.out () 00198 ACE_ENV_ARG_PARAMETER 00199 ); 00200 ACE_TRY_CHECK; 00201 00202 _tao_retval = 00203 servant_upcall.servant ()->_get_component ( 00204 ACE_ENV_SINGLE_ARG_PARAMETER 00205 ); 00206 ACE_TRY_CHECK; 00207 } 00208 // Direct collocation strategy is used. 00209 else if (target->_servant () != 0) 00210 { 00211 _tao_retval = 00212 target->_servant ()->_get_component ( 00213 ACE_ENV_SINGLE_ARG_PARAMETER 00214 ); 00215 ACE_TRY_CHECK; 00216 } 00217 } 00218 ACE_CATCH (CORBA::OBJECT_NOT_EXIST, ex) 00219 { 00220 // Ignore this exception. 00221 } 00222 ACE_CATCHANY 00223 { 00224 ACE_RE_THROW; 00225 } 00226 ACE_ENDTRY; 00227 ACE_CHECK_RETURN (_tao_retval._retn ()); 00228 00229 return _tao_retval._retn (); 00230 } |
|
Implements TAO::Object_Proxy_Broker. Definition at line 233 of file Collocated_Object_Proxy_Broker.cpp. References ACE_CATCH, ACE_CATCHANY, ACE_CHECK_RETURN, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_RE_THROW, ACE_TRY, ACE_TRY_CHECK, TAO::Portable_Server::Servant_Upcall::pre_invoke_collocated_request(), TAO::Portable_Server::Servant_Upcall::prepare_for_upcall(), TAO::Portable_Server::Servant_Upcall::servant(), and TAO_Stub::servant_orb_var().
00236 { 00237 CORBA::InterfaceDef_ptr _tao_retval = 0; 00238 00239 TAO_Stub *stub = target->_stubobj (); 00240 00241 ACE_TRY 00242 { 00243 // Which collocation strategy should we use? 00244 if (stub != 0 && 00245 stub->servant_orb_var ()->orb_core ()->get_collocation_strategy () 00246 == TAO_ORB_Core::THRU_POA) 00247 { 00248 TAO::Portable_Server::Servant_Upcall servant_upcall ( 00249 target->_stubobj ()->servant_orb_var ()->orb_core () 00250 ); 00251 00252 CORBA::Object_var forward_to; 00253 00254 servant_upcall.prepare_for_upcall ( 00255 target->_stubobj ()->object_key (), 00256 "_interface", 00257 forward_to.out () 00258 ACE_ENV_ARG_PARAMETER 00259 ); 00260 ACE_TRY_CHECK; 00261 00262 servant_upcall.pre_invoke_collocated_request ( 00263 ACE_ENV_SINGLE_ARG_PARAMETER 00264 ); 00265 ACE_TRY_CHECK; 00266 00267 _tao_retval = 00268 servant_upcall.servant ()->_get_interface ( 00269 ACE_ENV_SINGLE_ARG_PARAMETER 00270 ); 00271 ACE_TRY_CHECK; 00272 } 00273 // Direct collocation strategy is used. 00274 else if (target->_servant () != 0) 00275 { 00276 _tao_retval = 00277 target->_servant ()->_get_interface ( 00278 ACE_ENV_SINGLE_ARG_PARAMETER 00279 ); 00280 ACE_TRY_CHECK; 00281 } 00282 } 00283 ACE_CATCH (CORBA::OBJECT_NOT_EXIST, ex) 00284 { 00285 // Ignore this exception. 00286 } 00287 ACE_CATCHANY 00288 { 00289 ACE_RE_THROW; 00290 } 00291 ACE_ENDTRY; 00292 ACE_CHECK_RETURN (_tao_retval); 00293 00294 return _tao_retval; 00295 } |
|
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 ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, TAO_Profile::object_key(), 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(), and TAO_Stub::servant_orb_var().
00026 { 00027 TAO_Stub *stub = target->_stubobj (); 00028 00029 // Which collocation strategy should we use? 00030 if (stub != 0 && 00031 stub->servant_orb_var ()->orb_core ()->get_collocation_strategy () 00032 == TAO_ORB_Core::THRU_POA) 00033 { 00034 TAO::Portable_Server::Servant_Upcall servant_upcall ( 00035 stub->servant_orb_var ()->orb_core () 00036 ); 00037 00038 CORBA::Object_var forward_to; 00039 servant_upcall.prepare_for_upcall ( 00040 stub->profile_in_use ()->object_key (), 00041 "_is_a", 00042 forward_to.out () 00043 ACE_ENV_ARG_PARAMETER 00044 ); 00045 ACE_CHECK_RETURN (0); 00046 00047 servant_upcall.pre_invoke_collocated_request ( 00048 ACE_ENV_SINGLE_ARG_PARAMETER 00049 ); 00050 ACE_CHECK_RETURN (0); 00051 00052 return servant_upcall.servant ()->_is_a (type_id 00053 ACE_ENV_ARG_PARAMETER); 00054 } 00055 00056 // Direct collocation strategy is used. 00057 if (target->_servant () != 0) 00058 { 00059 return target->_servant ()->_is_a (type_id 00060 ACE_ENV_ARG_PARAMETER); 00061 } 00062 00063 return 0; 00064 } |
|
Implements TAO::Object_Proxy_Broker. Definition at line 126 of file Collocated_Object_Proxy_Broker.cpp. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, TAO::Portable_Server::Servant_Upcall::pre_invoke_collocated_request(), TAO::Portable_Server::Servant_Upcall::prepare_for_upcall(), TAO::Portable_Server::Servant_Upcall::servant(), and TAO_Stub::servant_orb_var().
00128 { 00129 CORBA::Boolean _tao_retval = true; 00130 00131 TAO_Stub *stub = target->_stubobj (); 00132 00133 // Which collocation strategy should we use? 00134 if (stub != 0 && 00135 stub->servant_orb_var ()->orb_core () 00136 ->get_collocation_strategy () == TAO_ORB_Core::THRU_POA) 00137 { 00138 TAO::Portable_Server::Servant_Upcall servant_upcall ( 00139 target->_stubobj ()->servant_orb_var ()->orb_core () 00140 ); 00141 00142 CORBA::Object_var forward_to; 00143 00144 servant_upcall.prepare_for_upcall ( 00145 target->_stubobj ()->object_key (), 00146 "_non_existent", 00147 forward_to.out () 00148 ACE_ENV_ARG_PARAMETER 00149 ); 00150 ACE_CHECK_RETURN (_tao_retval); 00151 00152 servant_upcall.pre_invoke_collocated_request ( 00153 ACE_ENV_SINGLE_ARG_PARAMETER 00154 ); 00155 ACE_CHECK_RETURN (_tao_retval); 00156 00157 _tao_retval = 00158 servant_upcall.servant ()->_non_existent ( 00159 ACE_ENV_SINGLE_ARG_PARAMETER 00160 ); 00161 ACE_CHECK_RETURN (_tao_retval); 00162 } 00163 // Direct collocation strategy is used. 00164 else if (target->_servant () != 0) 00165 { 00166 _tao_retval = 00167 target->_servant ()->_non_existent (ACE_ENV_SINGLE_ARG_PARAMETER); 00168 ACE_CHECK_RETURN (_tao_retval); 00169 } 00170 00171 return _tao_retval; 00172 } |
|
Implements TAO::Object_Proxy_Broker. Definition at line 69 of file Collocated_Object_Proxy_Broker.cpp. References ACE_CATCH, ACE_CATCHANY, ACE_CHECK_RETURN, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_RE_THROW, ACE_TRY, ACE_TRY_CHECK, TAO_Profile::object_key(), TAO::Portable_Server::Servant_Upcall::prepare_for_upcall(), TAO_Stub::profile_in_use(), TAO::Portable_Server::Servant_Upcall::servant(), and TAO_Stub::servant_orb_var().
00071 { 00072 TAO_Stub *stub = target->_stubobj (); 00073 char * _tao_retval = 0; 00074 00075 ACE_TRY 00076 { 00077 // Which collocation strategy should we use? 00078 if (stub != 0 && 00079 stub->servant_orb_var ()->orb_core () 00080 ->get_collocation_strategy () == TAO_ORB_Core::THRU_POA) 00081 { 00082 TAO::Portable_Server::Servant_Upcall servant_upcall ( 00083 stub->servant_orb_var ()->orb_core () 00084 ); 00085 00086 CORBA::Object_var forward_to; 00087 servant_upcall.prepare_for_upcall ( 00088 stub->profile_in_use ()->object_key (), 00089 "_repository_id", 00090 forward_to.out () 00091 ACE_ENV_ARG_PARAMETER 00092 ); 00093 ACE_TRY_CHECK; 00094 00095 _tao_retval = 00096 servant_upcall.servant ()->_repository_id ( 00097 ACE_ENV_SINGLE_ARG_PARAMETER 00098 ); 00099 ACE_TRY_CHECK; 00100 } 00101 // Direct collocation strategy is used. 00102 else if (target->_servant () != 0) 00103 { 00104 _tao_retval = 00105 target->_servant ()->_repository_id ( 00106 ACE_ENV_SINGLE_ARG_PARAMETER 00107 ); 00108 ACE_TRY_CHECK; 00109 } 00110 } 00111 ACE_CATCH (CORBA::OBJECT_NOT_EXIST, ex) 00112 { 00113 // Ignore this exception. 00114 } 00115 ACE_CATCHANY 00116 { 00117 ACE_RE_THROW; 00118 } 00119 ACE_ENDTRY; 00120 ACE_CHECK_RETURN (_tao_retval); 00121 00122 return _tao_retval; 00123 } |