DII_Invocation_Adapter.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    DII_Invocation_Adapter.h
00006  *
00007  *  DII_Invocation_Adapter.h,v 1.11 2006/04/19 09:39:46 jwillemsen Exp
00008  *
00009  *  @author Balachandran Natarajan <bala@dre.vanderbilt.edu>
00010  */
00011 //=============================================================================
00012 #ifndef TAO_DII_INVOCATION_ADAPTER_H
00013 #define TAO_DII_INVOCATION_ADAPTER_H
00014 #include /**/ "ace/pre.h"
00015 
00016 #include "tao/DynamicInterface/dynamicinterface_export.h"
00017 
00018 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00019 # pragma once
00020 #endif /* ACE_LACKS_PRAGMA_ONCE */
00021 
00022 
00023 #include "tao/Invocation_Adapter.h"
00024 
00025 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00026 class ACE_Time_Value;
00027 ACE_END_VERSIONED_NAMESPACE_DECL
00028 
00029 
00030 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00031 class TAO_Operation_Details;
00032 class TAO_Stub;
00033 class TAO_ORB_Core;
00034 class TAO_DII_Deferred_Reply_Dispatcher;
00035 namespace  CORBA
00036 {
00037   class Object;
00038   class Environment;
00039   class SystemException;
00040   class ExceptionList;
00041   class Request;
00042 }
00043 
00044 namespace TAO
00045 {
00046   class Argument;
00047   class Collocation_Proxy_Broker;
00048   struct Exception_Data;
00049 
00050   /**
00051    * @class DII_Invocation_Adapter
00052    *
00053    * @brief Generic interface for the DII invocation object visible
00054    */
00055   class TAO_DynamicInterface_Export DII_Invocation_Adapter :
00056     public Invocation_Adapter
00057   {
00058   public:
00059     /// The only constructor used by the IDL compiler and onlly way to
00060     /// create this adapter.
00061     /**
00062      *
00063      * @param target Points to the object on which this invocation is
00064      * being invoked.
00065      *
00066      * @param args Array of pointers to the argument list in the
00067      * operation declaration. this includes the return, inout and out
00068      * arguments.
00069      *
00070      * @param arg_number Number of arguments in the above array. This
00071      * is the number of elements in the above array.
00072      *
00073      * @param operation The name of the operation being invoked.
00074      *
00075      * @param ope_len Number of charecters in the operation name. This
00076      * is an optimization which helps us to avoid calling strlen ()
00077      * while creating a message format.
00078      *
00079      * @param cpb The collocation proxy broker for the target if one
00080      * exists.
00081      *
00082      * @param type The operation type which could be a oneway or two
00083      * way operation. this information is availbe in the IDL file.
00084      *
00085      * @param mode Invocation mode. This information is also available
00086      * in the IDL file and in the generated code.
00087      */
00088     DII_Invocation_Adapter (CORBA::Object *target,
00089                             Argument **args,
00090                             int arg_number,
00091                             const char *operation,
00092                             size_t op_len,
00093                             CORBA::ExceptionList *exception,
00094                             CORBA::Request *r,
00095                             Invocation_Mode m = TAO_DII_INVOCATION);
00096 
00097 
00098     virtual ~DII_Invocation_Adapter (void) {}
00099 
00100   protected:
00101 
00102     virtual Invocation_Status invoke_twoway (
00103         TAO_Operation_Details &op,
00104         CORBA::Object_var &effective_target,
00105         Profile_Transport_Resolver &r,
00106         ACE_Time_Value *&max_wait_time
00107         ACE_ENV_ARG_DECL);
00108 
00109   private:
00110 
00111     CORBA::ExceptionList *exception_list_;
00112 
00113     CORBA::Request *request_;
00114   private:
00115 
00116     /// Dont allow default initializations
00117     DII_Invocation_Adapter (void);
00118 
00119     DII_Invocation_Adapter (const DII_Invocation_Adapter &);
00120     DII_Invocation_Adapter & operator= (const DII_Invocation_Adapter &);
00121   };
00122 
00123   /**
00124    *
00125    */
00126   class TAO_DynamicInterface_Export DII_Deferred_Invocation_Adapter
00127     : protected Invocation_Adapter
00128   {
00129   public:
00130     DII_Deferred_Invocation_Adapter (
00131         CORBA::Object *target,
00132         Argument **args,
00133         int arg_number,
00134         const char *operation,
00135         size_t op_len,
00136         Collocation_Proxy_Broker *b,
00137         TAO_ORB_Core *oc,
00138         CORBA::Request *req,
00139         TAO::Invocation_Mode mode = TAO_DII_DEFERRED_INVOCATION);
00140 
00141     /// Invoke the target
00142     virtual void invoke (TAO::Exception_Data *ex,
00143                          unsigned long ex_count
00144                          ACE_ENV_ARG_DECL);
00145 
00146 
00147   protected:
00148     virtual Invocation_Status invoke_twoway (
00149         TAO_Operation_Details &op,
00150         CORBA::Object_var &effective_target,
00151         Profile_Transport_Resolver &r,
00152         ACE_Time_Value *&max_wait_time
00153         ACE_ENV_ARG_DECL);
00154 
00155   private:
00156     CORBA::Request *request_;
00157 
00158     /// Reply dispatcher for the current Invocation.
00159     TAO_DII_Deferred_Reply_Dispatcher *rd_;
00160 
00161     /// Cache the orb_core
00162     TAO_ORB_Core * const orb_core_;
00163   };
00164 } // End namespace TAO
00165 
00166 TAO_END_VERSIONED_NAMESPACE_DECL
00167 
00168 #include /**/ "ace/post.h"
00169 #endif /*TAO_INVOCATION_ADAPTER_H*/

Generated on Thu Nov 9 13:04:21 2006 for TAO_DynamicInterface by doxygen 1.3.6