2 #include "tao/GIOP_Utils.h"
4 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
6 // This constructor is used by the CSD clone.
8 TAO_ServerRequest::TAO_ServerRequest ()
12 release_operation_ (false),
13 is_forwarded_ (false),
16 response_expected_ (false),
17 deferred_reply_ (false),
18 sync_with_server_ (false),
21 reply_status_ (GIOP::NO_EXCEPTION),
25 requesting_principal_ (0),
26 dsi_nvlist_align_ (0),
27 operation_details_ (0),
29 #if TAO_HAS_INTERCEPTORS == 1
30 , interceptor_count_ (0)
32 , caught_exception_ (0)
33 , pi_reply_status_ (-1)
34 #endif /* TAO_HAS_INTERCEPTORS == 1 */
39 ACE_INLINE TAO_ORB_Core *
40 TAO_ServerRequest::orb_core () const
42 return this->orb_core_;
45 ACE_INLINE TAO_InputCDR *
46 TAO_ServerRequest::incoming () const
48 return this->incoming_;
51 ACE_INLINE TAO_OutputCDR *
52 TAO_ServerRequest::outgoing () const
54 return this->outgoing_;
57 ACE_INLINE const char *
58 TAO_ServerRequest::operation () const
60 return (this->operation_ == 0 ? "" : this->operation_);
64 TAO_ServerRequest::operation (const char *operation,
68 if (this->release_operation_)
69 CORBA::string_free (const_cast <char*> (this->operation_));
71 this->operation_len_ = (length == 0 ? std::strlen (operation) : length);
72 this->release_operation_ = release;
73 this->operation_ = operation;
77 TAO_ServerRequest::operation_length () const
79 return this->operation_len_;
82 ACE_INLINE CORBA::Boolean
83 TAO_ServerRequest::response_expected () const
85 return this->response_expected_;
88 ACE_INLINE CORBA::Boolean
89 TAO_ServerRequest::deferred_reply () const
91 return this->deferred_reply_;
95 TAO_ServerRequest::response_expected (CORBA::Boolean response)
97 this->response_expected_ = response;
101 TAO_ServerRequest::sync_before_dispatch ()
103 if (this->sync_with_server_ &&
104 this->transport_ != 0 &&
107 this->send_no_exception_reply ();
112 TAO_ServerRequest::sync_after_dispatch ()
114 if (this->sync_with_server_ &&
115 this->transport_ != 0 &&
118 this->send_no_exception_reply ();
122 ACE_INLINE CORBA::Boolean
123 TAO_ServerRequest::sync_with_server () const
125 return this->sync_with_server_;
129 TAO_ServerRequest::sync_with_server (CORBA::Boolean sync_flag)
131 this->sync_with_server_ = sync_flag;
134 ACE_INLINE CORBA::Boolean
135 TAO_ServerRequest::is_queued () const
137 return this->is_queued_;
141 TAO_ServerRequest::is_queued (CORBA::Boolean queued_flag)
143 this->is_queued_ = queued_flag;
146 ACE_INLINE TAO::ObjectKey &
147 TAO_ServerRequest::object_key ()
149 return this->profile_.object_key ();
152 ACE_INLINE TAO_Service_Context &
153 TAO_ServerRequest::request_service_context ()
155 return this->request_service_context_;
158 ACE_INLINE IOP::ServiceContextList &
159 TAO_ServerRequest::reply_service_info ()
161 return this->reply_service_context ().service_info ();
164 ACE_INLINE IOP::ServiceContextList &
165 TAO_ServerRequest::request_service_info ()
167 return this->request_service_context ().service_info ();
170 ACE_INLINE TAO_Transport *
171 TAO_ServerRequest::transport ()
173 return this->transport_.get ();
176 ACE_INLINE CORBA::ULong
177 TAO_ServerRequest::request_id ()
179 return this->request_id_;
183 TAO_ServerRequest::request_id (CORBA::ULong req)
185 this->request_id_ = req;
189 TAO_ServerRequest::requesting_principal (const CORBA::OctetSeq &principal)
191 this->requesting_principal_ = principal;
194 ACE_INLINE TAO_Tagged_Profile &
195 TAO_ServerRequest::profile ()
197 return this->profile_;
201 TAO_ServerRequest::forward_location (CORBA::Object_ptr forward_reference)
203 this->forward_location_ =
204 CORBA::Object::_duplicate (forward_reference);
205 this->is_forwarded_ = true;
208 ACE_INLINE CORBA::Object_ptr
209 TAO_ServerRequest::forward_location ()
211 return CORBA::Object::_duplicate (this->forward_location_.in ());
215 TAO_ServerRequest::is_forwarded () const
217 return this->is_forwarded_;
220 ACE_INLINE GIOP::ReplyStatusType
221 TAO_ServerRequest::reply_status ()
223 return this->reply_status_;
227 TAO_ServerRequest::reply_status (GIOP::ReplyStatusType reply_status)
229 this->reply_status_ = reply_status;
233 TAO_ServerRequest::is_dsi ()
235 this->is_dsi_ = true;
238 ACE_INLINE TAO_Operation_Details const *
239 TAO_ServerRequest::operation_details () const
241 return this->operation_details_;
245 TAO_ServerRequest::dsi_nvlist_align (ptrdiff_t alignment)
247 this->dsi_nvlist_align_ = alignment;
250 ACE_INLINE CORBA::Boolean
251 TAO_ServerRequest::argument_flag ()
253 return this->argument_flag_;
257 TAO_ServerRequest::argument_flag (CORBA::Boolean flag)
259 this->argument_flag_ = flag;
263 TAO_ServerRequest::collocated () const
265 return this->transport_.get () == 0;
269 #if TAO_HAS_INTERCEPTORS == 1
271 TAO_ServerRequest::interceptor_count ()
273 return this->interceptor_count_;
276 ACE_INLINE CORBA::Exception *
277 TAO_ServerRequest::caught_exception ()
279 return this->caught_exception_;
283 TAO_ServerRequest::pi_reply_status (PortableInterceptor::ReplyStatus s)
285 this->pi_reply_status_ = s;
288 ACE_INLINE PortableInterceptor::ReplyStatus
289 TAO_ServerRequest::pi_reply_status ()
291 return this->pi_reply_status_;
294 #endif /* TAO_HAS_INTERCEPTORS == 1 */
296 TAO_END_VERSIONED_NAMESPACE_DECL