00001 // -*- C++ -*- 00002 // 00003 // $Id: CSD_FW_Server_Request_Wrapper.inl 76995 2007-02-11 12:51:42Z johnnyw $ 00004 00005 #include "tao/SystemException.h" 00006 00007 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00008 00009 ACE_INLINE 00010 TAO::CSD::FW_Server_Request_Wrapper::FW_Server_Request_Wrapper 00011 (TAO_ServerRequest& server_request) 00012 : is_clone_(false), 00013 request_(&server_request) 00014 { 00015 } 00016 00017 00018 ACE_INLINE 00019 void 00020 TAO::CSD::FW_Server_Request_Wrapper::clone() 00021 { 00022 // Only clone the TAO_Server_Request object if we have not performed the 00023 // clone already. This really should only be called once, but this code 00024 // makes sure that we do not introduce a leak. 00025 if (!this->is_clone_) 00026 { 00027 this->request_ = this->clone (this->request_); 00028 this->is_clone_ = true; 00029 } 00030 } 00031 00032 00033 ACE_INLINE 00034 void 00035 TAO::CSD::FW_Server_Request_Wrapper::cancel() 00036 { 00037 // We only need to handle remote requests that are expecting a reply. 00038 if (!this->request_->collocated() && 00039 !this->request_->sync_with_server() && 00040 this->request_->response_expected() && 00041 !this->request_->deferred_reply()) 00042 { 00043 CORBA::NO_IMPLEMENT ex; 00044 this->request_->tao_send_reply_exception(ex); 00045 } 00046 } 00047 00048 TAO_END_VERSIONED_NAMESPACE_DECL