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