#include <DII_Invocation.h>
Inheritance diagram for TAO::DII_Invocation:
Public Member Functions | |
DII_Invocation (CORBA::Object_ptr otarget, Profile_Transport_Resolver &resolver, TAO_Operation_Details &detail, CORBA::ExceptionList *excp, CORBA::Request_ptr req, bool response_expected=true) | |
virtual Dynamic::ParameterList * | arguments () throw (CORBA::SystemException) |
Invocation_Status | remote_invocation (ACE_Time_Value *max_wait_time) throw (CORBA::Exception) |
virtual Invocation_Status | handle_user_exception (TAO_InputCDR &cdr) throw (CORBA::Exception) |
Private Attributes | |
CORBA::ExceptionList * | excp_list_ |
CORBA::Request_ptr | host_ |
Back pointer to the DII request that created us. | |
Friends | |
class | DII_Invocation_Adapter |
|
Definition at line 34 of file DII_Invocation.cpp.
00040 : Synch_Twoway_Invocation (otarget, 00041 resolver, 00042 detail, 00043 response_expected) 00044 , excp_list_ (excp) 00045 , host_ (req) 00046 { 00047 } |
|
Definition at line 51 of file DII_Invocation.cpp. References ACE_CHECK_RETURN, ACE_ENV_SINGLE_ARG_PARAMETER, and TAO::NVList_Argument::interceptor_paramlist().
00053 { 00054 // Generate the argument list on demand. 00055 Dynamic::ParameterList *parameter_list = 00056 TAO_RequestInfo_Util::make_parameter_list (ACE_ENV_SINGLE_ARG_PARAMETER); 00057 ACE_CHECK_RETURN (0); 00058 00059 Dynamic::ParameterList_var safe_parameter_list = parameter_list; 00060 00061 TAO::Argument **args = 00062 this->details_.args (); 00063 00064 if (this->details_.args_num () > 1) 00065 { 00066 // Take the second argument since the first is a return value. 00067 TAO::NVList_Argument *tmp_arg = 00068 dynamic_cast <TAO::NVList_Argument*> (args[1]); 00069 00070 tmp_arg->interceptor_paramlist (parameter_list); 00071 } 00072 00073 return safe_parameter_list._retn (); 00074 } |
|
Reimplemented from TAO::Synch_Twoway_Invocation. Definition at line 87 of file DII_Invocation.cpp. References ACE_CHECK_RETURN, ACE_DEBUG, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_NEW_RETURN, ACE_THROW_RETURN, LM_DEBUG, ACE_InputCDR::read_string(), TAO::Reply_Guard::set_status(), ACE_OS::strcmp(), TAO_debug_level, TAO::TAO_INVOKE_FAILURE, and TAO::TAO_INVOKE_USER_EXCEPTION.
00090 { 00091 Reply_Guard mon (this, 00092 TAO_INVOKE_FAILURE); 00093 00094 if (TAO_debug_level > 3) 00095 { 00096 ACE_DEBUG ((LM_DEBUG, 00097 "TAO (%P|%t) - DII_Invocation::" 00098 "handle_user_exception \n")); 00099 } 00100 00101 // Match the exception interface repository id with the 00102 // exception in the exception list. 00103 // This is important to decode the exception. 00104 CORBA::String_var buf; 00105 00106 TAO_InputCDR tmp_stream (cdr, 00107 cdr.start ()->length (), 00108 0); 00109 00110 // Pull the exception ID out of the marshaling buffer. 00111 if (tmp_stream.read_string (buf.inout ()) == 0) 00112 { 00113 ACE_THROW_RETURN (CORBA::MARSHAL (TAO::VMCID, 00114 CORBA::COMPLETED_YES), 00115 TAO_INVOKE_FAILURE); 00116 } 00117 00118 for (CORBA::ULong i = 0; 00119 this->excp_list_ != 0 && i < this->excp_list_->count (); 00120 i++) 00121 { 00122 CORBA::TypeCode_var tc = 00123 this->excp_list_->item (i 00124 ACE_ENV_ARG_PARAMETER); 00125 ACE_CHECK_RETURN (TAO_INVOKE_FAILURE); 00126 00127 const char *xid = tc->id (ACE_ENV_SINGLE_ARG_PARAMETER); 00128 ACE_CHECK_RETURN (TAO_INVOKE_FAILURE); 00129 00130 if (ACE_OS::strcmp (buf.in (), xid) != 0) 00131 { 00132 continue; 00133 } 00134 00135 CORBA::Any any; 00136 TAO::Unknown_IDL_Type *unk = 0; 00137 ACE_NEW_RETURN (unk, 00138 TAO::Unknown_IDL_Type ( 00139 tc.in (), 00140 cdr 00141 ), 00142 TAO_INVOKE_FAILURE); 00143 00144 any.replace (unk); 00145 00146 mon.set_status (TAO_INVOKE_USER_EXCEPTION); 00147 00148 ACE_THROW_RETURN (CORBA::UnknownUserException (any), 00149 TAO_INVOKE_USER_EXCEPTION); 00150 } 00151 00152 // If we couldn't find the right exception, report it as 00153 // CORBA::UNKNOWN. 00154 00155 // But first, save the user exception in case we 00156 // are being used in a TAO gateway. 00157 this->host_->raw_user_exception (cdr); 00158 00159 00160 mon.set_status (TAO_INVOKE_USER_EXCEPTION); 00161 00162 // @@ It would seem that if the remote exception is a 00163 // UserException we can assume that the request was 00164 // completed. 00165 ACE_THROW_RETURN (CORBA::UNKNOWN (TAO::VMCID, 00166 CORBA::COMPLETED_YES), 00167 TAO_INVOKE_USER_EXCEPTION); 00168 00169 } |
|
Definition at line 78 of file DII_Invocation.cpp. References ACE_ENV_ARG_PARAMETER. Referenced by TAO::DII_Invocation_Adapter::invoke_twoway().
00081 {
00082 return Synch_Twoway_Invocation::remote_twoway (max_wait_time
00083 ACE_ENV_ARG_PARAMETER);
00084 }
|
|
Definition at line 48 of file DII_Invocation.h. |
|
Definition at line 75 of file DII_Invocation.h. |
|
Back pointer to the DII request that created us.
Definition at line 78 of file DII_Invocation.h. |