TAO::DII_Invocation Class Reference

#include <DII_Invocation.h>

Inheritance diagram for TAO::DII_Invocation:

Inheritance graph
[legend]
Collaboration diagram for TAO::DII_Invocation:

Collaboration graph
[legend]
List of all members.

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::ExceptionListexcp_list_
CORBA::Request_ptr host_
 Back pointer to the DII request that created us.


Friends

class DII_Invocation_Adapter

Constructor & Destructor Documentation

TAO::DII_Invocation::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
 

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   }


Member Function Documentation

Dynamic::ParameterList * TAO::DII_Invocation::arguments  )  throw (CORBA::SystemException) [virtual]
 

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   }

Invocation_Status TAO::DII_Invocation::handle_user_exception TAO_InputCDR cdr  )  throw (CORBA::Exception) [virtual]
 

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   }

Invocation_Status TAO::DII_Invocation::remote_invocation ACE_Time_Value max_wait_time  )  throw (CORBA::Exception)
 

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   }


Friends And Related Function Documentation

friend class DII_Invocation_Adapter [friend]
 

Definition at line 48 of file DII_Invocation.h.


Member Data Documentation

CORBA::ExceptionList* TAO::DII_Invocation::excp_list_ [private]
 

Definition at line 75 of file DII_Invocation.h.

CORBA::Request_ptr TAO::DII_Invocation::host_ [private]
 

Back pointer to the DII request that created us.

Definition at line 78 of file DII_Invocation.h.


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 13:05:14 2006 for TAO_DynamicInterface by doxygen 1.3.6