Generic interface for the DII invocation object visible. More...
#include <DII_Invocation_Adapter.h>
Public Member Functions | |
DII_Invocation_Adapter (CORBA::Object *target, Argument **args, int arg_number, const char *operation, size_t op_len, CORBA::ExceptionList *exception, CORBA::Request *r, Invocation_Mode mode=TAO_DII_INVOCATION) | |
virtual | ~DII_Invocation_Adapter (void) |
virtual void | invoke (TAO::Exception_Data *ex, unsigned long ex_count) |
Invoke the target. | |
Protected Member Functions | |
virtual Invocation_Status | invoke_twoway (TAO_Operation_Details &op, CORBA::Object_var &effective_target, Profile_Transport_Resolver &r, ACE_Time_Value *&max_wait_time) |
Helper method to make a two way invocation. | |
virtual Invocation_Status | invoke_collocated_i (TAO_Stub *stub, TAO_Operation_Details &details, CORBA::Object_var &effective_target, Collocation_Strategy strat) |
Make a collocated call. | |
Private Member Functions | |
DII_Invocation_Adapter (void) | |
Dont allow default initializations. | |
DII_Invocation_Adapter (const DII_Invocation_Adapter &) | |
DII_Invocation_Adapter & | operator= (const DII_Invocation_Adapter &) |
Private Attributes | |
CORBA::ExceptionList * | exception_list_ |
CORBA::Request * | request_ |
TAO::Exception_Data * | ex_data_ |
Generic interface for the DII invocation object visible.
Definition at line 58 of file DII_Invocation_Adapter.h.
TAO::DII_Invocation_Adapter::DII_Invocation_Adapter | ( | CORBA::Object * | target, | |
Argument ** | args, | |||
int | arg_number, | |||
const char * | operation, | |||
size_t | op_len, | |||
CORBA::ExceptionList * | exception, | |||
CORBA::Request * | r, | |||
Invocation_Mode | mode = TAO_DII_INVOCATION | |||
) |
The only constructor used by the IDL compiler and only way to create this adapter.
target | Points to the object on which this invocation is being invoked. | |
args | Array of pointers to the argument list in the operation declaration. this includes the return, inout and out arguments. | |
arg_number | Number of arguments in the above array. This is the number of elements in the above array. | |
operation | The name of the operation being invoked. | |
op_len | Number of characters in the operation name. This is an optimization which helps us to avoid calling strlen () while creating a message format. | |
mode | Invocation mode. This information is also available in the IDL file and in the generated code. |
Definition at line 13 of file DII_Invocation_Adapter.cpp.
: DII_Invocation_Adapter.cpp 84739 2009-03-06 17:30:13Z mitza $") TAO_BEGIN_VERSIONED_NAMESPACE_DECL namespace TAO { DII_Invocation_Adapter::DII_Invocation_Adapter (CORBA::Object *target, Argument **args, int arg_number, const char *operation, size_t op_len,
TAO::DII_Invocation_Adapter::~DII_Invocation_Adapter | ( | void | ) | [virtual] |
Definition at line 36 of file DII_Invocation_Adapter.cpp.
: Invocation_Adapter (target,
TAO::DII_Invocation_Adapter::DII_Invocation_Adapter | ( | void | ) | [private] |
Dont allow default initializations.
TAO::DII_Invocation_Adapter::DII_Invocation_Adapter | ( | const DII_Invocation_Adapter & | ) | [private] |
void TAO::DII_Invocation_Adapter::invoke | ( | TAO::Exception_Data * | ex, | |
unsigned long | ex_count | |||
) | [virtual] |
Invoke the target.
Reimplemented from TAO::Invocation_Adapter.
Definition at line 42 of file DII_Invocation_Adapter.cpp.
{ } DII_Invocation_Adapter::~DII_Invocation_Adapter (void) { delete[] ex_data_; } void DII_Invocation_Adapter::invoke (TAO::Exception_Data * /*ex_data*/, unsigned long ex_count) { // Convert DII exception list to a form the invocation can use
Invocation_Status TAO::DII_Invocation_Adapter::invoke_collocated_i | ( | TAO_Stub * | stub, | |
TAO_Operation_Details & | details, | |||
CORBA::Object_var & | effective_target, | |||
Collocation_Strategy | strat | |||
) | [protected, virtual] |
Make a collocated call.
This method creates an object that takes care of making collocated invocations and calls invoke () on it. If the invoke () returns with a location forwarded reply we return a restart
stub | The stub object on which the invocation is made. | |
details | The operations details of the operation that is being invoked. |
Reimplemented from TAO::Invocation_Adapter.
Definition at line 65 of file DII_Invocation_Adapter.cpp.
{ CORBA::TypeCode_var xtc = this->exception_list_->item (l); this->ex_data_[l].id = xtc->id (); this->ex_data_[l].alloc = 0; #if TAO_HAS_INTERCEPTORS == 1 this->ex_data_[l].tc_ptr = xtc.in (); #endif } Invocation_Adapter::invoke (this->ex_data_, ex_count); }
Invocation_Status TAO::DII_Invocation_Adapter::invoke_twoway | ( | TAO_Operation_Details & | details, | |
CORBA::Object_var & | effective_target, | |||
Profile_Transport_Resolver & | r, | |||
ACE_Time_Value *& | max_wait_time | |||
) | [protected, virtual] |
Helper method to make a two way invocation.
This method creates a synchronous twoway invocation object to which the actual task of request handling is delegated. Once the invocation returns this method checks whether the request is forwarded to a new location.
Reimplemented from TAO::Invocation_Adapter.
Reimplemented in TAO::DII_Asynch_Invocation_Adapter.
Definition at line 83 of file DII_Invocation_Adapter.cpp.
{ TAO_DII_Arguments_Converter_Impl* dii_arguments_converter = ACE_Dynamic_Service<TAO_DII_Arguments_Converter_Impl>::instance ( "DII_Arguments_Converter"); details.cac (dii_arguments_converter); return Invocation_Adapter::invoke_collocated_i (stub, details, effective_target, strat); } Invocation_Status DII_Invocation_Adapter::invoke_twoway ( TAO_Operation_Details &op, CORBA::Object_var &effective_target, Profile_Transport_Resolver &r, ACE_Time_Value *&max_wait_time) { // Simple sanity check if (this->mode_ != TAO_DII_INVOCATION || this->type_ != TAO_TWOWAY_INVOCATION) { throw ::CORBA::INTERNAL ( CORBA::SystemException::_tao_minor_code ( TAO::VMCID, EINVAL), CORBA::COMPLETED_NO); } TAO_Transport* const transport = r.transport (); if (!transport) { // Way back, we failed to find a profile we could connect to. // We've come this far only so we reach the interception points // in case they can fix things. Time to bail.... throw CORBA::TRANSIENT (CORBA::OMGVMCID | 2, CORBA::COMPLETED_NO); } ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, transport->output_cdr_lock (), TAO_INVOKE_FAILURE); transport->messaging_object ()->out_stream ().reset_byte_order ( request_->_tao_byte_order ()); TAO::DII_Invocation synch (this->target_, r, op, this->exception_list_, this->request_); ace_mon.release();
DII_Invocation_Adapter& TAO::DII_Invocation_Adapter::operator= | ( | const DII_Invocation_Adapter & | ) | [private] |
TAO::Exception_Data* TAO::DII_Invocation_Adapter::ex_data_ [private] |
Definition at line 119 of file DII_Invocation_Adapter.h.
CORBA::ExceptionList* TAO::DII_Invocation_Adapter::exception_list_ [private] |
Definition at line 115 of file DII_Invocation_Adapter.h.
CORBA::Request* TAO::DII_Invocation_Adapter::request_ [private] |
Definition at line 117 of file DII_Invocation_Adapter.h.