00001
00002
00003
00004
00005
00006
00007
00008
00009
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
00021
00022
00023 #include "tao/Invocation_Adapter.h"
00024
00025 #if defined (TAO_HAS_AMI)
00026 #include "tao/Messaging/Messaging.h"
00027 #endif
00028
00029 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00030 class ACE_Time_Value;
00031 ACE_END_VERSIONED_NAMESPACE_DECL
00032
00033
00034 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00035 class TAO_Operation_Details;
00036 class TAO_Stub;
00037 class TAO_ORB_Core;
00038 class TAO_DII_Deferred_Reply_Dispatcher;
00039 class TAO_DII_Asynch_Reply_Dispatcher;
00040 namespace CORBA
00041 {
00042 class Object;
00043 class ExceptionList;
00044 class Request;
00045 }
00046
00047 namespace TAO
00048 {
00049 class Argument;
00050 class Collocation_Proxy_Broker;
00051 struct Exception_Data;
00052
00053
00054
00055
00056
00057
00058 class TAO_DynamicInterface_Export DII_Invocation_Adapter :
00059 public Invocation_Adapter
00060 {
00061 public:
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085 DII_Invocation_Adapter (CORBA::Object *target,
00086 Argument **args,
00087 int arg_number,
00088 const char *operation,
00089 size_t op_len,
00090 CORBA::ExceptionList *exception,
00091 CORBA::Request *r,
00092 Invocation_Mode mode = TAO_DII_INVOCATION);
00093
00094 virtual ~DII_Invocation_Adapter (void);
00095
00096 protected:
00097
00098 virtual Invocation_Status invoke_twoway (
00099 TAO_Operation_Details &op,
00100 CORBA::Object_var &effective_target,
00101 Profile_Transport_Resolver &r,
00102 ACE_Time_Value *&max_wait_time);
00103
00104 virtual Invocation_Status invoke_collocated_i (
00105 TAO_Stub *stub,
00106 TAO_Operation_Details &details,
00107 CORBA::Object_var &effective_target,
00108 Collocation_Strategy strat);
00109
00110 private:
00111
00112 CORBA::ExceptionList *exception_list_;
00113
00114 CORBA::Request *request_;
00115 private:
00116
00117
00118 DII_Invocation_Adapter (void);
00119
00120 DII_Invocation_Adapter (const DII_Invocation_Adapter &);
00121 DII_Invocation_Adapter & operator= (const DII_Invocation_Adapter &);
00122 };
00123
00124
00125
00126
00127
00128
00129 class TAO_DynamicInterface_Export DII_Deferred_Invocation_Adapter
00130 : protected Invocation_Adapter
00131 {
00132 public:
00133 DII_Deferred_Invocation_Adapter (
00134 CORBA::Object *target,
00135 Argument **args,
00136 int arg_number,
00137 const char *operation,
00138 size_t op_len,
00139 Collocation_Proxy_Broker *b,
00140 TAO_ORB_Core *oc,
00141 CORBA::Request *req,
00142 TAO::Invocation_Mode mode = TAO_DII_DEFERRED_INVOCATION);
00143
00144
00145 virtual void invoke (TAO::Exception_Data *ex, unsigned long ex_count);
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
00154 virtual Invocation_Status invoke_collocated_i (
00155 TAO_Stub *stub,
00156 TAO_Operation_Details &details,
00157 CORBA::Object_var &effective_target,
00158 Collocation_Strategy strat);
00159
00160 private:
00161 CORBA::Request *request_;
00162
00163
00164 TAO_DII_Deferred_Reply_Dispatcher *rd_;
00165
00166
00167 TAO_ORB_Core * const orb_core_;
00168 };
00169
00170 #if defined (TAO_HAS_AMI)
00171
00172
00173
00174
00175
00176 class TAO_DynamicInterface_Export DII_Asynch_Invocation_Adapter
00177 : protected DII_Invocation_Adapter
00178 {
00179 public:
00180 DII_Asynch_Invocation_Adapter (
00181 CORBA::Object *target,
00182 Argument **args,
00183 int arg_number,
00184 const char *operation,
00185 int op_len,
00186 CORBA::Request *req,
00187 TAO::Invocation_Mode mode = TAO_DII_ASYNCH_INVOCATION);
00188
00189
00190 void invoke_reply_handler (Messaging::ReplyHandler_ptr reply_handler_ptr);
00191
00192 protected:
00193 virtual Invocation_Status invoke_twoway (
00194 TAO_Operation_Details &op,
00195 CORBA::Object_var &effective_target,
00196 Profile_Transport_Resolver &r,
00197 ACE_Time_Value *&max_wait_time);
00198 };
00199 #endif
00200
00201
00202
00203
00204
00205
00206 class TAO_DynamicInterface_Export DII_Oneway_Invocation_Adapter
00207 : public Invocation_Adapter
00208 {
00209 public:
00210 DII_Oneway_Invocation_Adapter (
00211 CORBA::Object *target,
00212 Argument **args,
00213 int arg_number,
00214 const char *operation,
00215 int op_len,
00216 TAO::Invocation_Mode mode = TAO_SYNCHRONOUS_INVOCATION);
00217
00218 protected:
00219 virtual Invocation_Status invoke_collocated_i (
00220 TAO_Stub *stub,
00221 TAO_Operation_Details &details,
00222 CORBA::Object_var &effective_target,
00223 Collocation_Strategy strat);
00224 };
00225 }
00226
00227 TAO_END_VERSIONED_NAMESPACE_DECL
00228
00229 #include "ace/post.h"
00230 #endif