TAO::DII_Deferred_Invocation_Adapter Class Reference

#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)

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.


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

References TAO::TAO_TWOWAY_INVOCATION.

00114     : Invocation_Adapter (target,
00115                           args,
00116                           arg_number,
00117                           operation,
00118                           op_len,
00119                           b,
00120                           TAO_TWOWAY_INVOCATION,
00121                           mode)
00122       , request_ (req)
00123       , rd_ (0)
00124       , orb_core_ (oc)
00125   {
00126   }


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

References ACE_CHECK, ACE_ENV_ARG_PARAMETER, and ACE_NEW_THROW_EX.

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

00133   {
00134     // New reply dispatcher on the heap, because we will go out of
00135     // scope and hand over the  reply dispatcher to the ORB.
00136     // So this->rd_ is 0, because we do not need to
00137     // hold a pointer to it.
00138     ACE_NEW_THROW_EX (this->rd_,
00139         TAO_DII_Deferred_Reply_Dispatcher (this->request_,
00140                                            this->orb_core_),
00141                       CORBA::NO_MEMORY ());
00142 
00143     Invocation_Adapter::invoke (ex,
00144                                 ex_count
00145                                 ACE_ENV_ARG_PARAMETER);
00146     ACE_CHECK;
00147   }

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

References CORBA::Request::_tao_byte_order(), ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, 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_FAILURE, TAO::TAO_INVOKE_RESTART, TAO::TAO_TWOWAY_INVOCATION, and TAO::Profile_Transport_Resolver::transport().

00156   {
00157     // Simple sanity check
00158     if (this->mode_ != TAO_DII_DEFERRED_INVOCATION ||
00159         this->type_ != TAO_TWOWAY_INVOCATION)
00160       {
00161         ACE_THROW_RETURN (CORBA::INTERNAL (
00162             CORBA::SystemException::_tao_minor_code (
00163                 TAO::VMCID,
00164                 EINVAL),
00165             CORBA::COMPLETED_NO),
00166                    TAO_INVOKE_FAILURE);
00167       }
00168 
00169     r.transport ()->messaging_object ()->out_stream ().reset_byte_order (request_->_tao_byte_order ());
00170     TAO::DII_Deferred_Invocation synch (
00171         this->target_,
00172         r,
00173         op,
00174         this->rd_,
00175         this->request_);
00176 
00177     r.transport ()->messaging_object ()->out_stream ().reset_byte_order (request_->_tao_byte_order ());
00178 
00179     Invocation_Status status =
00180       synch.remote_invocation (max_wait_time
00181                                ACE_ENV_ARG_PARAMETER);
00182     ACE_CHECK_RETURN (TAO_INVOKE_FAILURE);
00183 
00184     if (status == TAO_INVOKE_RESTART)
00185       {
00186         effective_target =
00187           synch.steal_forwarded_reference ();
00188       }
00189 
00190     return status;
00191   }


Member Data Documentation

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

Cache the orb_core.

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

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

Definition at line 156 of file DII_Invocation_Adapter.h.


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