TAO::DII_Deferred_Invocation_Adapter Class Reference

This class is for deferred DII invocation. More...

#include <DII_Invocation_Adapter.h>

Inheritance diagram for TAO::DII_Deferred_Invocation_Adapter:

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

Collaboration graph
[legend]
List of all members.

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)
virtual Invocation_Status invoke_collocated_i (TAO_Stub *stub, TAO_Operation_Details &details, CORBA::Object_var &effective_target, Collocation_Strategy strat)

Private Attributes

CORBA::Requestrequest_
TAO_DII_Deferred_Reply_Dispatcherrd_
 Reply dispatcher for the current Invocation.
TAO_ORB_Core *const orb_core_
 Cache the orb_core.

Detailed Description

This class is for deferred DII invocation.

Definition at line 134 of file DII_Invocation_Adapter.h.


Constructor & Destructor Documentation

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 
)

Definition at line 156 of file DII_Invocation_Adapter.cpp.

00166     : Invocation_Adapter (target,
00167                           args,
00168                           arg_number,
00169                           operation,
00170                           op_len,
00171                           b,
00172                           TAO_TWOWAY_INVOCATION,
00173                           mode)
00174       , request_ (req)
00175       , rd_ (0)
00176       , orb_core_ (oc)
00177   {
00178   }


Member Function Documentation

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 181 of file DII_Invocation_Adapter.cpp.

References ACE_NEW_THROW_EX.

00184   {
00185     // New reply dispatcher on the heap, because we will go out of
00186     // scope and hand over the reply dispatcher to the ORB.
00187     // So this->rd_ is 0, because we do not need to
00188     // hold a pointer to it.
00189     ACE_NEW_THROW_EX (this->rd_,
00190         TAO_DII_Deferred_Reply_Dispatcher (this->request_,
00191                                            this->orb_core_),
00192                       CORBA::NO_MEMORY ());
00193 
00194     Invocation_Adapter::invoke (ex, ex_count);
00195   }

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]

Reimplemented from TAO::Invocation_Adapter.

Definition at line 198 of file DII_Invocation_Adapter.cpp.

References TAO_Operation_Details::cac(), and ACE_Dynamic_Service< TYPE >::instance().

00203   {
00204     TAO_DII_Arguments_Converter_Impl* dii_arguments_converter
00205       = ACE_Dynamic_Service<TAO_DII_Arguments_Converter_Impl>::instance (
00206         "DII_Arguments_Converter");
00207     details.cac (dii_arguments_converter);
00208 
00209     return Invocation_Adapter::invoke_collocated_i (stub,
00210                                                     details,
00211                                                     effective_target,
00212                                                     strat);
00213   }

Invocation_Status TAO::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 
) [protected, virtual]

Reimplemented from TAO::Invocation_Adapter.

Definition at line 216 of file DII_Invocation_Adapter.cpp.

References CORBA::Request::_tao_byte_order(), CORBA::SystemException::_tao_minor_code(), CORBA::COMPLETED_NO, TAO_Transport::messaging_object(), CORBA::OMGVMCID, TAO_GIOP_Message_Base::out_stream(), request_, ACE_OutputCDR::reset_byte_order(), TAO::TAO_DII_DEFERRED_INVOCATION, TAO::TAO_INVOKE_RESTART, TAO::TAO_TWOWAY_INVOCATION, TAO::Profile_Transport_Resolver::transport(), and TAO::VMCID.

00221   {
00222     // Simple sanity check
00223     if (this->mode_ != TAO_DII_DEFERRED_INVOCATION ||
00224         this->type_ != TAO_TWOWAY_INVOCATION)
00225       {
00226         throw ::CORBA::INTERNAL (
00227           CORBA::SystemException::_tao_minor_code (
00228             TAO::VMCID,
00229             EINVAL),
00230           CORBA::COMPLETED_NO);
00231       }
00232 
00233     TAO_Transport* const transport = r.transport ();
00234 
00235     if (!transport)
00236       {
00237         // Way back, we failed to find a profile we could connect to.
00238         // We've come this far only so we reach the interception points
00239         // in case they can fix things. Time to bail....
00240         throw CORBA::TRANSIENT (CORBA::OMGVMCID | 2, CORBA::COMPLETED_NO);
00241       }
00242 
00243     transport->messaging_object ()->out_stream ().reset_byte_order (
00244       request_->_tao_byte_order ());
00245 
00246     TAO::DII_Deferred_Invocation synch (
00247         this->target_,
00248         r,
00249         op,
00250         this->rd_,
00251         this->request_);
00252 
00253     Invocation_Status status = synch.remote_invocation (max_wait_time);
00254 
00255     if (status == TAO_INVOKE_RESTART)
00256       {
00257         effective_target = synch.steal_forwarded_reference ();
00258       }
00259 
00260     return status;
00261   }


Member Data Documentation

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.

Referenced by invoke_twoway().


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:43:28 2010 for TAO_DynamicInterface by  doxygen 1.4.7