This class is for deferred DII invocation. More...
#include <DII_Invocation_Adapter.h>
Public Member Functions | |
DII_Deferred_Invocation_Adapter (CORBA::Object *target, Argument **args, int arg_number, const char *operation, size_t op_len, Collocation_Proxy_Broker *b, TAO_ORB_Core *oc, CORBA::Request *req, TAO::Invocation_Mode mode=TAO_DII_DEFERRED_INVOCATION) | |
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 Attributes | |
CORBA::Request * | request_ |
TAO_DII_Deferred_Reply_Dispatcher * | rd_ |
Reply dispatcher for the current Invocation. | |
TAO_ORB_Core *const | orb_core_ |
Cache the orb_core. |
This class is for deferred DII invocation.
Definition at line 134 of file DII_Invocation_Adapter.h.
TAO::DII_Deferred_Invocation_Adapter::DII_Deferred_Invocation_Adapter | ( | CORBA::Object * | target, | |
Argument ** | args, | |||
int | arg_number, | |||
const char * | operation, | |||
size_t | op_len, | |||
Collocation_Proxy_Broker * | b, | |||
TAO_ORB_Core * | oc, | |||
CORBA::Request * | req, | |||
TAO::Invocation_Mode | mode = TAO_DII_DEFERRED_INVOCATION | |||
) |
void TAO::DII_Deferred_Invocation_Adapter::invoke | ( | TAO::Exception_Data * | ex, | |
unsigned long | ex_count | |||
) | [virtual] |
Invoke the target.
Reimplemented from TAO::Invocation_Adapter.
Definition at line 168 of file DII_Invocation_Adapter.cpp.
: Invocation_Adapter (target, args, arg_number, operation, op_len, b, TAO_TWOWAY_INVOCATION, mode) , request_ (req) , rd_ (0) , orb_core_ (oc) { }
Invocation_Status TAO::DII_Deferred_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 185 of file DII_Invocation_Adapter.cpp.
{ // New reply dispatcher on the heap, because we will go out of // scope and hand over the reply dispatcher to the ORB. // So this->rd_ is 0, because we do not need to // hold a pointer to it. ACE_NEW_THROW_EX (this->rd_, TAO_DII_Deferred_Reply_Dispatcher (this->request_, this->orb_core_), CORBA::NO_MEMORY ()); Invocation_Adapter::invoke (ex, ex_count); }
Invocation_Status TAO::DII_Deferred_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.
Definition at line 203 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_Deferred_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_DEFERRED_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_Deferred_Invocation synch (
TAO_ORB_Core* const TAO::DII_Deferred_Invocation_Adapter::orb_core_ [private] |
Cache the orb_core.
Definition at line 172 of file DII_Invocation_Adapter.h.
TAO_DII_Deferred_Reply_Dispatcher* TAO::DII_Deferred_Invocation_Adapter::rd_ [private] |
Reply dispatcher for the current Invocation.
Definition at line 169 of file DII_Invocation_Adapter.h.
CORBA::Request* TAO::DII_Deferred_Invocation_Adapter::request_ [private] |
Definition at line 166 of file DII_Invocation_Adapter.h.