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
00097 virtual void invoke (TAO::Exception_Data *ex, unsigned long ex_count);
00098
00099 protected:
00100
00101 virtual Invocation_Status invoke_twoway (
00102 TAO_Operation_Details &op,
00103 CORBA::Object_var &effective_target,
00104 Profile_Transport_Resolver &r,
00105 ACE_Time_Value *&max_wait_time);
00106
00107 virtual Invocation_Status invoke_collocated_i (
00108 TAO_Stub *stub,
00109 TAO_Operation_Details &details,
00110 CORBA::Object_var &effective_target,
00111 Collocation_Strategy strat);
00112
00113 private:
00114
00115 CORBA::ExceptionList *exception_list_;
00116
00117 CORBA::Request *request_;
00118
00119 TAO::Exception_Data *ex_data_;
00120 private:
00121
00122
00123 DII_Invocation_Adapter (void);
00124
00125 DII_Invocation_Adapter (const DII_Invocation_Adapter &);
00126 DII_Invocation_Adapter & operator= (const DII_Invocation_Adapter &);
00127 };
00128
00129
00130
00131
00132
00133
00134 class TAO_DynamicInterface_Export DII_Deferred_Invocation_Adapter
00135 : protected Invocation_Adapter
00136 {
00137 public:
00138 DII_Deferred_Invocation_Adapter (
00139 CORBA::Object *target,
00140 Argument **args,
00141 int arg_number,
00142 const char *operation,
00143 size_t op_len,
00144 Collocation_Proxy_Broker *b,
00145 TAO_ORB_Core *oc,
00146 CORBA::Request *req,
00147 TAO::Invocation_Mode mode = TAO_DII_DEFERRED_INVOCATION);
00148
00149
00150 virtual void invoke (TAO::Exception_Data *ex, unsigned long ex_count);
00151
00152 protected:
00153 virtual Invocation_Status invoke_twoway (
00154 TAO_Operation_Details &op,
00155 CORBA::Object_var &effective_target,
00156 Profile_Transport_Resolver &r,
00157 ACE_Time_Value *&max_wait_time);
00158
00159 virtual Invocation_Status invoke_collocated_i (
00160 TAO_Stub *stub,
00161 TAO_Operation_Details &details,
00162 CORBA::Object_var &effective_target,
00163 Collocation_Strategy strat);
00164
00165 private:
00166 CORBA::Request *request_;
00167
00168
00169 TAO_DII_Deferred_Reply_Dispatcher *rd_;
00170
00171
00172 TAO_ORB_Core * const orb_core_;
00173 };
00174
00175 #if defined (TAO_HAS_AMI)
00176
00177
00178
00179
00180
00181 class TAO_DynamicInterface_Export DII_Asynch_Invocation_Adapter
00182 : protected DII_Invocation_Adapter
00183 {
00184 public:
00185 DII_Asynch_Invocation_Adapter (
00186 CORBA::Object *target,
00187 Argument **args,
00188 int arg_number,
00189 const char *operation,
00190 int op_len,
00191 CORBA::Request *req,
00192 TAO::Invocation_Mode mode = TAO_DII_ASYNCH_INVOCATION);
00193
00194
00195 void invoke_reply_handler (Messaging::ReplyHandler_ptr reply_handler_ptr);
00196
00197 protected:
00198 virtual Invocation_Status invoke_twoway (
00199 TAO_Operation_Details &op,
00200 CORBA::Object_var &effective_target,
00201 Profile_Transport_Resolver &r,
00202 ACE_Time_Value *&max_wait_time);
00203 };
00204 #endif
00205
00206
00207
00208
00209
00210
00211 class TAO_DynamicInterface_Export DII_Oneway_Invocation_Adapter
00212 : public Invocation_Adapter
00213 {
00214 public:
00215 DII_Oneway_Invocation_Adapter (
00216 CORBA::Object *target,
00217 Argument **args,
00218 int arg_number,
00219 const char *operation,
00220 int op_len,
00221 TAO::Invocation_Mode mode = TAO_SYNCHRONOUS_INVOCATION);
00222
00223 protected:
00224 virtual Invocation_Status invoke_collocated_i (
00225 TAO_Stub *stub,
00226 TAO_Operation_Details &details,
00227 CORBA::Object_var &effective_target,
00228 Collocation_Strategy strat);
00229 };
00230 }
00231
00232 TAO_END_VERSIONED_NAMESPACE_DECL
00233
00234 #include "ace/post.h"
00235 #endif