Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / CSD_Framework / CSD_FW_Server_Request_Wrapper.inl
blob9015c828530025b9afc825b3e50ac9e8a43708c1
1 // -*- C++ -*-
2 #include "tao/SystemException.h"
4 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
6 ACE_INLINE
7 TAO::CSD::FW_Server_Request_Wrapper::FW_Server_Request_Wrapper
8                                           (TAO_ServerRequest& server_request)
9   : is_clone_(false),
10     request_(&server_request)
15 ACE_INLINE
16 void
17 TAO::CSD::FW_Server_Request_Wrapper::clone()
19   // Only clone the TAO_Server_Request object if we have not performed the
20   // clone already.  This really should only be called once, but this code
21   // makes sure that we do not introduce a leak.
22   if (!this->is_clone_)
23     {
24       this->request_ = this->clone (this->request_);
25       this->is_clone_ = true;
26     }
30 ACE_INLINE
31 void
32 TAO::CSD::FW_Server_Request_Wrapper::cancel()
34   // We only need to handle remote requests that are expecting a reply.
35   if (!this->request_->collocated()       &&
36       !this->request_->sync_with_server() &&
37       this->request_->response_expected() &&
38       !this->request_->deferred_reply())
39     {
40           CORBA::NO_IMPLEMENT ex;
41           this->request_->tao_send_reply_exception(ex);
42     }
45 TAO_END_VERSIONED_NAMESPACE_DECL