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

References TAO::TAO_TWOWAY_INVOCATION.

00130     : Invocation_Adapter (target,
00131                           args,
00132                           arg_number,
00133                           operation,
00134                           op_len,
00135                           b,
00136                           TAO_TWOWAY_INVOCATION,
00137                           mode)
00138       , request_ (req)
00139       , rd_ (0)
00140       , orb_core_ (oc)
00141   {
00142   }


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

References ACE_NEW_THROW_EX.

Referenced by CORBA::Request::send_deferred().

00148   {
00149     // New reply dispatcher on the heap, because we will go out of
00150     // scope and hand over the reply dispatcher to the ORB.
00151     // So this->rd_ is 0, because we do not need to
00152     // hold a pointer to it.
00153     ACE_NEW_THROW_EX (this->rd_,
00154         TAO_DII_Deferred_Reply_Dispatcher (this->request_,
00155                                            this->orb_core_),
00156                       CORBA::NO_MEMORY ());
00157 
00158     Invocation_Adapter::invoke (ex, ex_count);
00159   }

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

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

00167   {
00168     TAO_DII_Arguments_Converter_Impl* dii_arguments_converter
00169       = ACE_Dynamic_Service<TAO_DII_Arguments_Converter_Impl>::instance (
00170         "DII_Arguments_Converter");
00171     details.cac (dii_arguments_converter);
00172 
00173     return Invocation_Adapter::invoke_collocated_i (stub,
00174                                                     details,
00175                                                     effective_target,
00176                                                     strat);
00177   }

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

References CORBA::Request::_tao_byte_order(), TAO::Invocation_Status, TAO_Transport::messaging_object(), TAO_Pluggable_Messaging::out_stream(), TAO::DII_Deferred_Invocation::remote_invocation(), ACE_OutputCDR::reset_byte_order(), TAO::TAO_DII_DEFERRED_INVOCATION, TAO::TAO_INVOKE_RESTART, TAO::TAO_TWOWAY_INVOCATION, and TAO::Profile_Transport_Resolver::transport().

00185   {
00186     // Simple sanity check
00187     if (this->mode_ != TAO_DII_DEFERRED_INVOCATION ||
00188         this->type_ != TAO_TWOWAY_INVOCATION)
00189       {
00190         throw ::CORBA::INTERNAL (
00191           CORBA::SystemException::_tao_minor_code (
00192             TAO::VMCID,
00193             EINVAL),
00194           CORBA::COMPLETED_NO);
00195       }
00196 
00197     r.transport ()->messaging_object ()->out_stream ().reset_byte_order (request_->_tao_byte_order ());
00198     TAO::DII_Deferred_Invocation synch (
00199         this->target_,
00200         r,
00201         op,
00202         this->rd_,
00203         this->request_);
00204 
00205     r.transport ()->messaging_object ()->out_stream ().reset_byte_order (request_->_tao_byte_order ());
00206 
00207     Invocation_Status status = synch.remote_invocation (max_wait_time);
00208 
00209     if (status == TAO_INVOKE_RESTART)
00210       {
00211         effective_target = synch.steal_forwarded_reference ();
00212       }
00213 
00214     return status;
00215   }


Member Data Documentation

TAO_ORB_Core* const TAO::DII_Deferred_Invocation_Adapter::orb_core_ [private]
 

Cache the orb_core.

Definition at line 167 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 164 of file DII_Invocation_Adapter.h.

CORBA::Request* TAO::DII_Deferred_Invocation_Adapter::request_ [private]
 

Definition at line 161 of file DII_Invocation_Adapter.h.


The documentation for this class was generated from the following files:
Generated on Sun Jan 27 13:37:53 2008 for TAO_DynamicInterface by doxygen 1.3.6