00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef TAO_SERVER_REQUEST_H
00020 #define TAO_SERVER_REQUEST_H
00021
00022 #include "ace/pre.h"
00023 #include "ace/SString.h"
00024
00025 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00026 # pragma once
00027 #endif
00028
00029 #include "tao/Tagged_Profile.h"
00030 #include "tao/Service_Context.h"
00031 #include "tao/Object.h"
00032
00033 #if TAO_HAS_INTERCEPTORS == 1
00034
00035 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00036
00037 namespace TAO
00038 {
00039 class PICurrent;
00040 class PICurrent_Impl;
00041 }
00042 TAO_END_VERSIONED_NAMESPACE_DECL
00043
00044 #include "tao/PortableInterceptorC.h"
00045
00046 #endif
00047
00048 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00049
00050 class TAO_Pluggable_Messaging;
00051 class TAO_Transport;
00052 class TAO_AMH_Response_Handler;
00053
00054 namespace CORBA
00055 {
00056 class ORB;
00057 typedef ORB *ORB_ptr;
00058
00059 class Exception;
00060 }
00061
00062 namespace TAO
00063 {
00064 namespace CSD
00065 {
00066 class FW_Server_Request_Wrapper;
00067 }
00068 }
00069
00070 class TAO_Operation_Details;
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080 class TAO_Export TAO_ServerRequest
00081 {
00082 public:
00083
00084
00085
00086
00087 friend class TAO::CSD::FW_Server_Request_Wrapper;
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101 friend class TAO_AMH_Response_Handler;
00102
00103
00104
00105 TAO_ServerRequest (TAO_Pluggable_Messaging *mesg_base,
00106 TAO_InputCDR &input,
00107 TAO_OutputCDR &output,
00108 TAO_Transport *transport,
00109 TAO_ORB_Core *orb_core);
00110
00111 TAO_ServerRequest (TAO_Pluggable_Messaging *mesg_base,
00112 CORBA::ULong request_id,
00113 CORBA::Boolean response_expected,
00114 CORBA::Boolean deferred_flag,
00115 TAO::ObjectKey &object_key,
00116 const char *operation,
00117 TAO_OutputCDR &output,
00118 TAO_Transport *transport,
00119 TAO_ORB_Core *orb_core,
00120 int &parse_error);
00121
00122
00123 TAO_ServerRequest (TAO_ORB_Core * orb_core,
00124 TAO_Operation_Details const & details,
00125 CORBA::Object_ptr target);
00126
00127
00128 ~TAO_ServerRequest (void);
00129
00130
00131
00132
00133
00134
00135 const char *operation (void) const;
00136
00137
00138 void operation (const char *operation,
00139 size_t length,
00140 int release);
00141
00142
00143 size_t operation_length (void) const;
00144
00145
00146
00147 CORBA::ORB_ptr orb (void);
00148
00149
00150 TAO_ORB_Core *orb_core (void) const;
00151
00152
00153 void init_reply (void);
00154
00155
00156 TAO_InputCDR * incoming (void) const;
00157
00158
00159 TAO_OutputCDR * outgoing (void) const;
00160
00161
00162 CORBA::Boolean response_expected (void) const;
00163
00164
00165 CORBA::Boolean deferred_reply (void) const;
00166
00167
00168 void response_expected (CORBA::Boolean response);
00169
00170
00171 CORBA::Boolean sync_with_server (void) const;
00172
00173
00174 void sync_with_server (CORBA::Boolean sync_flag);
00175
00176
00177 void send_no_exception_reply (void);
00178
00179 TAO::ObjectKey &object_key (void);
00180
00181
00182 TAO_Service_Context &request_service_context (void);
00183
00184
00185 TAO_Service_Context &reply_service_context (void);
00186
00187 IOP::ServiceContextList &reply_service_info (void);
00188
00189 IOP::ServiceContextList &request_service_info (void);
00190
00191
00192 TAO_Transport *transport ();
00193
00194
00195
00196
00197 CORBA::ULong request_id (void);
00198 void request_id (CORBA::ULong req);
00199
00200
00201
00202
00203
00204
00205
00206 void forward_location (CORBA::Object_ptr forward_reference);
00207
00208
00209 CORBA::Object_ptr forward_location (void);
00210
00211
00212 CORBA::ULong exception_type (void);
00213
00214
00215 void exception_type (CORBA::ULong except_type);
00216
00217
00218 void requesting_principal (const CORBA::OctetSeq & principal);
00219
00220
00221 TAO_Tagged_Profile &profile (void);
00222
00223 void tao_send_reply (void);
00224
00225 void tao_send_reply_exception (CORBA::Exception&);
00226
00227
00228 void is_dsi (void);
00229
00230
00231 void dsi_nvlist_align (ptrdiff_t alignment);
00232
00233
00234 TAO_Operation_Details const * operation_details (void) const;
00235
00236
00237 void argument_flag (CORBA::Boolean flag);
00238
00239
00240 CORBA::Boolean argument_flag (void);
00241
00242
00243 bool collocated (void) const;
00244
00245 #if TAO_HAS_INTERCEPTORS == 1
00246
00247
00248 void send_cached_reply (CORBA::OctetSeq &ocs);
00249
00250
00251
00252 void result_seq (CORBA::OctetSeq &ocs);
00253
00254
00255 int got_result (void);
00256
00257
00258
00259
00260
00261
00262
00263
00264 size_t & interceptor_count (void);
00265
00266
00267 TAO::PICurrent_Impl *rs_pi_current (void);
00268
00269 CORBA::Exception *caught_exception (void);
00270
00271 void caught_exception (CORBA::Exception *exception);
00272
00273
00274 void reply_status (PortableInterceptor::ReplyStatus s);
00275
00276
00277 PortableInterceptor::ReplyStatus reply_status (void);
00278
00279 #endif
00280
00281 private:
00282 TAO_Pluggable_Messaging *mesg_base_;
00283
00284
00285 ACE_CString operation_;
00286
00287 CORBA::Object_var forward_location_;
00288
00289
00290 TAO_InputCDR *incoming_;
00291
00292
00293 TAO_OutputCDR *outgoing_;
00294
00295
00296 TAO_Transport *transport_;
00297
00298
00299
00300 CORBA::Boolean response_expected_;
00301
00302
00303
00304
00305
00306
00307
00308 CORBA::Boolean deferred_reply_;
00309
00310
00311
00312 CORBA::Boolean sync_with_server_;
00313
00314
00315 CORBA::Boolean is_dsi_;
00316
00317
00318 CORBA::ULong exception_type_;
00319
00320
00321
00322 TAO_ORB_Core *orb_core_;
00323
00324
00325 TAO_Service_Context request_service_context_;
00326 TAO_Service_Context reply_service_context_;
00327
00328
00329 CORBA::ULong request_id_;
00330
00331
00332 TAO_Tagged_Profile profile_;
00333
00334
00335 CORBA::OctetSeq_var requesting_principal_;
00336
00337
00338 ptrdiff_t dsi_nvlist_align_;
00339
00340 TAO_Operation_Details const * operation_details_;
00341
00342
00343
00344
00345
00346
00347
00348 CORBA::Boolean argument_flag_;
00349
00350 #if TAO_HAS_INTERCEPTORS == 1
00351
00352
00353 size_t interceptor_count_;
00354
00355
00356
00357 TAO::PICurrent_Impl *rs_pi_current_;
00358
00359
00360 CORBA::OctetSeq_var result_seq_;
00361
00362
00363 CORBA::Exception * caught_exception_;
00364
00365
00366 PortableInterceptor::ReplyStatus reply_status_;
00367 #endif
00368 };
00369
00370 TAO_END_VERSIONED_NAMESPACE_DECL
00371
00372 #if defined (__ACE_INLINE__)
00373 # include "tao/TAO_Server_Request.i"
00374 #endif
00375
00376 #include "ace/post.h"
00377
00378 #endif