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 #include "tao/GIOPC.h"
00034
00035 #if TAO_HAS_INTERCEPTORS == 1
00036
00037 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00038
00039 namespace TAO
00040 {
00041 class PICurrent;
00042 class PICurrent_Impl;
00043 }
00044 TAO_END_VERSIONED_NAMESPACE_DECL
00045
00046 #include "tao/PortableInterceptorC.h"
00047
00048 #endif
00049
00050 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00051
00052 class TAO_GIOP_Message_Base;
00053 class TAO_Transport;
00054 class TAO_AMH_Response_Handler;
00055
00056 namespace CORBA
00057 {
00058 class ORB;
00059 typedef ORB *ORB_ptr;
00060
00061 class Exception;
00062 }
00063
00064 namespace TAO
00065 {
00066 namespace CSD
00067 {
00068 class FW_Server_Request_Wrapper;
00069 }
00070 }
00071
00072 class TAO_Operation_Details;
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082 class TAO_Export TAO_ServerRequest
00083 {
00084 public:
00085
00086
00087
00088
00089 friend class TAO::CSD::FW_Server_Request_Wrapper;
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103 friend class TAO_AMH_Response_Handler;
00104
00105
00106
00107 TAO_ServerRequest (TAO_GIOP_Message_Base *mesg_base,
00108 TAO_InputCDR &input,
00109 TAO_OutputCDR &output,
00110 TAO_Transport *transport,
00111 TAO_ORB_Core *orb_core);
00112
00113 TAO_ServerRequest (TAO_GIOP_Message_Base *mesg_base,
00114 CORBA::ULong request_id,
00115 CORBA::Boolean response_expected,
00116 CORBA::Boolean deferred_flag,
00117 TAO::ObjectKey &object_key,
00118 const char *operation,
00119 TAO_OutputCDR &output,
00120 TAO_Transport *transport,
00121 TAO_ORB_Core *orb_core,
00122 int &parse_error);
00123
00124
00125 TAO_ServerRequest (TAO_ORB_Core * orb_core,
00126 TAO_Operation_Details const & details,
00127 CORBA::Object_ptr target);
00128
00129
00130 ~TAO_ServerRequest (void);
00131
00132
00133
00134
00135
00136
00137 const char *operation (void) const;
00138
00139
00140 void operation (const char *operation, size_t length, 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
00213
00214
00215 bool is_forwarded (void) const;
00216
00217
00218 GIOP::ReplyStatusType reply_status (void);
00219
00220
00221 void reply_status (GIOP::ReplyStatusType except_type);
00222
00223
00224 void requesting_principal (const CORBA::OctetSeq & principal);
00225
00226
00227 TAO_Tagged_Profile &profile (void);
00228
00229 void tao_send_reply (void);
00230
00231 void tao_send_reply_exception (const CORBA::Exception& ex);
00232
00233
00234 void is_dsi (void);
00235
00236
00237 void dsi_nvlist_align (ptrdiff_t alignment);
00238
00239
00240 TAO_Operation_Details const * operation_details (void) const;
00241
00242
00243 void argument_flag (CORBA::Boolean flag);
00244
00245
00246 CORBA::Boolean argument_flag (void);
00247
00248
00249 bool collocated (void) const;
00250
00251 #if TAO_HAS_INTERCEPTORS == 1
00252
00253
00254 void send_cached_reply (CORBA::OctetSeq &ocs);
00255
00256
00257
00258
00259
00260
00261
00262
00263 size_t & interceptor_count (void);
00264
00265
00266 TAO::PICurrent_Impl *rs_pi_current (void);
00267
00268 CORBA::Exception *caught_exception (void);
00269
00270 void caught_exception (CORBA::Exception *exception);
00271
00272
00273 void pi_reply_status (PortableInterceptor::ReplyStatus s);
00274
00275
00276 PortableInterceptor::ReplyStatus pi_reply_status (void);
00277 #endif
00278
00279 private:
00280
00281
00282 TAO_ServerRequest (void);
00283
00284 TAO_GIOP_Message_Base *mesg_base_;
00285
00286
00287 const char* operation_;
00288
00289
00290 size_t operation_len_;
00291
00292
00293 bool release_operation_;
00294
00295 CORBA::Object_var forward_location_;
00296
00297 bool is_forwarded_;
00298
00299
00300 TAO_InputCDR *incoming_;
00301
00302 TAO_OutputCDR *outgoing_;
00303
00304
00305
00306 CORBA::Boolean response_expected_;
00307
00308
00309
00310
00311
00312
00313
00314 CORBA::Boolean deferred_reply_;
00315
00316
00317
00318 CORBA::Boolean sync_with_server_;
00319
00320
00321 CORBA::Boolean is_dsi_;
00322
00323
00324 GIOP::ReplyStatusType reply_status_;
00325
00326
00327
00328 TAO_ORB_Core *orb_core_;
00329
00330
00331 TAO_Service_Context request_service_context_;
00332 TAO_Service_Context reply_service_context_;
00333
00334
00335 CORBA::ULong request_id_;
00336
00337
00338 TAO_Tagged_Profile profile_;
00339
00340
00341 CORBA::OctetSeq_var requesting_principal_;
00342
00343
00344 ptrdiff_t dsi_nvlist_align_;
00345
00346 TAO_Operation_Details const * operation_details_;
00347
00348
00349
00350
00351
00352
00353
00354 CORBA::Boolean argument_flag_;
00355
00356 #if TAO_HAS_INTERCEPTORS == 1
00357
00358
00359 size_t interceptor_count_;
00360
00361
00362
00363 TAO::PICurrent_Impl *rs_pi_current_;
00364
00365
00366 CORBA::Exception * caught_exception_;
00367
00368
00369 PortableInterceptor::ReplyStatus pi_reply_status_;
00370 #endif
00371
00372
00373
00374
00375 TAO::Transport_Selection_Guard transport_;
00376 };
00377
00378 TAO_END_VERSIONED_NAMESPACE_DECL
00379
00380 #if defined (__ACE_INLINE__)
00381 # include "tao/TAO_Server_Request.inl"
00382 #endif
00383
00384 #include "ace/post.h"
00385
00386 #endif