#include <LocateRequest_Invocation_Adapter.h>
Collaboration diagram for TAO::LocateRequest_Invocation_Adapter:
Public Member Functions | |
LocateRequest_Invocation_Adapter (CORBA::Object_ptr target) | |
void | invoke () |
Start the invocation on the target. | |
CORBA::PolicyList * | get_inconsistent_policies (void) |
Accessor to the inconsistent policy list. | |
Private Member Functions | |
bool | get_timeout (ACE_Time_Value &val) |
Private Attributes | |
CORBA::Object_ptr | target_ |
CORBA::PolicyList_var | list_ |
This class provides a look and feel similar to the TAO::Invocation_Adapter though the functionalities are different. For the record, IDL compiler doesn't know the existence of this class. This class is concerned with the creation and invocation of locate request invocations to the target object
Definition at line 53 of file LocateRequest_Invocation_Adapter.h.
|
|
|
Accessor to the inconsistent policy list.
Definition at line 100 of file LocateRequest_Invocation_Adapter.cpp. References TAO_Seq_Var_Base_T< T >::_retn(). Referenced by CORBA::Object::_validate_connection().
|
|
Definition at line 106 of file LocateRequest_Invocation_Adapter.cpp. References TAO_ORB_Core::call_timeout_hook(), and CORBA::Object::orb_core(). Referenced by invoke().
00107 { 00108 bool has_timeout = false; 00109 this->target_->orb_core ()->call_timeout_hook (this->target_->_stubobj (), 00110 has_timeout, 00111 timeout); 00112 00113 return has_timeout; 00114 } |
|
Start the invocation on the target.
Definition at line 25 of file LocateRequest_Invocation_Adapter.cpp. References CORBA::Object::_stubobj(), ACE_CATCH, ACE_CATCHANY, ACE_CHECK, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_RE_THROW, ACE_THROW, ACE_TRY, ACE_TRY_CHECK, get_timeout(), TAO::Profile_Transport_Resolver::init_inconsistent_policies(), TAO::Invocation_Status, TAO::LocateRequest_Invocation::invoke(), TAO_Transport_Mux_Strategy::request_id(), TAO_Operation_Details::request_id(), TAO::Profile_Transport_Resolver::resolve(), TAO::Profile_Transport_Resolver::steal_inconsistent_policies(), TAO::TAO_INVOKE_RESTART, TAO::TAO_INVOKE_START, TAO_Transport::tms(), and TAO::Profile_Transport_Resolver::transport(). Referenced by CORBA::Object::_validate_connection().
00026 { 00027 CORBA::Object * const effective_target = this->target_; 00028 00029 TAO_Stub * const stub = 00030 this->target_->_stubobj (); 00031 00032 if (stub == 0) 00033 ACE_THROW (CORBA::INTERNAL ( 00034 CORBA::SystemException::_tao_minor_code ( 00035 0, 00036 EINVAL), 00037 CORBA::COMPLETED_NO)); 00038 00039 ACE_Time_Value tmp_wait_time; 00040 ACE_Time_Value *max_wait_time = 0; 00041 00042 bool const is_timeout = 00043 this->get_timeout (tmp_wait_time); 00044 00045 if (is_timeout) 00046 max_wait_time = &tmp_wait_time; 00047 00048 Invocation_Status s = TAO_INVOKE_START; 00049 00050 while (s == TAO_INVOKE_START || 00051 s == TAO_INVOKE_RESTART) 00052 { 00053 Profile_Transport_Resolver resolver (effective_target, 00054 stub, 00055 true); 00056 00057 ACE_TRY 00058 { 00059 resolver.init_inconsistent_policies ( 00060 ACE_ENV_SINGLE_ARG_PARAMETER); 00061 ACE_TRY_CHECK; 00062 00063 resolver.resolve (max_wait_time 00064 ACE_ENV_ARG_PARAMETER); 00065 ACE_TRY_CHECK; 00066 00067 // Dummy operation details that is used to instantiate the 00068 // LocateRequest class. 00069 TAO_Operation_Details op (0, 00070 0, 00071 false); 00072 00073 op.request_id (resolver.transport ()->tms ()->request_id ()); 00074 TAO::LocateRequest_Invocation synch (this->target_, 00075 resolver, 00076 op); 00077 00078 s = synch.invoke (max_wait_time 00079 ACE_ENV_ARG_PARAMETER); 00080 ACE_TRY_CHECK; 00081 } 00082 ACE_CATCH (CORBA::INV_POLICY, ex) 00083 { 00084 this->list_ = 00085 resolver.steal_inconsistent_policies (); 00086 ACE_RE_THROW; 00087 } 00088 ACE_CATCHANY 00089 { 00090 ACE_RE_THROW; 00091 } 00092 ACE_ENDTRY; 00093 ACE_CHECK; 00094 } 00095 00096 return; 00097 } |
|
Definition at line 71 of file LocateRequest_Invocation_Adapter.h. |
|
Definition at line 70 of file LocateRequest_Invocation_Adapter.h. |