00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef TAO_REQUEST_H
00018 #define TAO_REQUEST_H
00019
00020 #include "ace/pre.h"
00021
00022 #include "tao/orbconf.h"
00023
00024 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00025 # pragma once
00026 #endif
00027
00028
00029
00030 #include "tao/DynamicInterface/Dynamic_Adapter_Impl.h"
00031
00032 #include "tao/DynamicInterface/ExceptionList.h"
00033
00034 #include "tao/ORB.h"
00035 #include "tao/Environment.h"
00036 #include "tao/CDR.h"
00037 #include "tao/AnyTypeCode/NVList.h"
00038
00039 #include "ace/SString.h"
00040
00041 #if defined (TAO_EXPORT_MACRO)
00042 #undef TAO_EXPORT_MACRO
00043 #endif
00044 #define TAO_EXPORT_MACRO TAO_DynamicInterface_Export
00045
00046 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00047
00048 namespace CORBA
00049 {
00050 class NVList;
00051 typedef NVList *NVList_ptr;
00052
00053 class Context;
00054 typedef Context *Context_ptr;
00055
00056 class ContextList;
00057 typedef ContextList *ContextList_ptr;
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067 class TAO_DynamicInterface_Export Request
00068 {
00069 public:
00070
00071
00072 CORBA::Object_ptr target (void) const;
00073
00074
00075 const CORBA::Char *operation (void) const;
00076
00077
00078 CORBA::NVList_ptr arguments (void);
00079
00080
00081 CORBA::NamedValue_ptr result (void);
00082
00083
00084 CORBA::ExceptionList_ptr exceptions (void);
00085
00086
00087 CORBA::Context_ptr ctx (void) const;
00088
00089
00090 void ctx (CORBA::Context_ptr);
00091
00092
00093
00094 CORBA::ContextList_ptr contexts (void);
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104 CORBA::Any &add_in_arg (void);
00105 CORBA::Any &add_in_arg (const char* name);
00106 CORBA::Any &add_inout_arg (void);
00107 CORBA::Any &add_inout_arg (const char* name);
00108 CORBA::Any &add_out_arg (void);
00109 CORBA::Any &add_out_arg (const char* name);
00110
00111
00112
00113 void set_return_type (CORBA::TypeCode_ptr tc);
00114
00115
00116 CORBA::Any &return_value (void);
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130 void invoke (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
00131
00132
00133
00134
00135
00136
00137
00138 void send_oneway (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
00139
00140
00141
00142
00143
00144
00145
00146 void send_deferred (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
00147 void get_response (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
00148 CORBA::Boolean poll_response (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
00149
00150
00151
00152 void handle_response (TAO_InputCDR &incoming,
00153 CORBA::ULong reply_status
00154 ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00155
00156
00157 static CORBA::Request* _duplicate (CORBA::Request*);
00158 static CORBA::Request* _nil (void);
00159
00160
00161 CORBA::ULong _incr_refcnt (void);
00162 CORBA::ULong _decr_refcnt (void);
00163
00164
00165 void _tao_lazy_evaluation (bool lazy_evaluation);
00166
00167
00168 int _tao_byte_order (void) const;
00169
00170
00171 void _tao_byte_order (int byte_order);
00172
00173
00174
00175 void raw_user_exception (TAO_InputCDR &cdr);
00176
00177
00178 ACE_CString &raw_user_exception (void);
00179
00180
00181
00182
00183 CORBA::Boolean response_received (void);
00184
00185
00186 typedef CORBA::Request_ptr _ptr_type;
00187 typedef CORBA::Request_var _var_type;
00188 typedef CORBA::Request_out _out_type;
00189
00190 private:
00191 friend class ::TAO_Dynamic_Adapter_Impl;
00192
00193
00194
00195
00196 Request (CORBA::Object_ptr obj,
00197 CORBA::ORB_ptr orb,
00198 const CORBA::Char *op,
00199 CORBA::NVList_ptr args,
00200 CORBA::NamedValue_ptr result,
00201 CORBA::Flags flags,
00202 CORBA::ExceptionList_ptr exceptions
00203 ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00204
00205 Request (CORBA::Object_ptr obj,
00206 CORBA::ORB_ptr orb,
00207 const CORBA::Char *op
00208 ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00209
00210 ~Request (void);
00211
00212 private:
00213
00214
00215 CORBA::Object_ptr target_;
00216
00217
00218 CORBA::ORB_var orb_;
00219
00220
00221 const char * opname_;
00222
00223
00224 CORBA::NVList_ptr args_;
00225
00226
00227 CORBA::NamedValue_ptr result_;
00228
00229
00230 CORBA::Flags flags_;
00231
00232
00233
00234
00235
00236 CORBA::ExceptionList_var exceptions_;
00237
00238
00239 CORBA::ContextList_ptr contexts_;
00240
00241
00242 CORBA::Context_ptr ctx_;
00243
00244
00245 CORBA::ULong refcount_;
00246
00247
00248 TAO_SYNCH_MUTEX lock_;
00249
00250
00251 bool lazy_evaluation_;
00252
00253
00254 CORBA::Boolean response_received_;
00255
00256
00257 int byte_order_;
00258
00259
00260
00261 ACE_CString raw_user_exception_;
00262
00263 };
00264 }
00265
00266 TAO_END_VERSIONED_NAMESPACE_DECL
00267
00268 #if defined (__ACE_INLINE__)
00269 # include "tao/DynamicInterface/Request.inl"
00270 #endif
00271
00272 #include "ace/post.h"
00273
00274 #endif