Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

ClientRequestInfo.cpp

Go to the documentation of this file.
00001 #include "tao_pch.h"
00002 // -*- C++ -*-
00003 
00004 #include "ClientRequestInfo.h"
00005 #include "ClientRequestInfo_i.h"
00006 
00007 ACE_RCSID (TAO,
00008            ClientRequestInfo,
00009            "$Id: ClientRequestInfo.cpp,v 1.1.1.2.2.3 2003/04/01 14:45:51 chad Exp $")
00010 
00011 #if TAO_HAS_INTERCEPTORS == 1
00012 
00013 # if !defined (__ACE_INLINE__)
00014 #   include "ClientRequestInfo.inl"
00015 # endif /* !__ACE_INLINE__ */
00016 
00017 TAO_ClientRequestInfo::TAO_ClientRequestInfo (void)
00018   : info_ (0)
00019 {
00020 }
00021 
00022 CORBA::Object_ptr
00023 TAO_ClientRequestInfo::target (ACE_ENV_SINGLE_ARG_DECL)
00024   ACE_THROW_SPEC ((CORBA::SystemException))
00025 {
00026   this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
00027   ACE_CHECK_RETURN (CORBA::Object::_nil ());
00028 
00029   return this->info_->target (ACE_ENV_SINGLE_ARG_PARAMETER);
00030 }
00031 
00032 CORBA::Object_ptr
00033 TAO_ClientRequestInfo::effective_target (ACE_ENV_SINGLE_ARG_DECL)
00034   ACE_THROW_SPEC ((CORBA::SystemException))
00035 {
00036   this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
00037   ACE_CHECK_RETURN (CORBA::Object::_nil ());
00038 
00039   return this->info_->effective_target (ACE_ENV_SINGLE_ARG_PARAMETER);
00040 }
00041 
00042 IOP::TaggedProfile *
00043 TAO_ClientRequestInfo::effective_profile (ACE_ENV_SINGLE_ARG_DECL)
00044   ACE_THROW_SPEC ((CORBA::SystemException))
00045 {
00046   this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
00047   ACE_CHECK_RETURN (0);
00048 
00049   return this->info_->effective_profile (ACE_ENV_SINGLE_ARG_PARAMETER);
00050 }
00051 
00052 // Use at own risk. There is no way currently of extracting an
00053 // exception from an Any. This method is in place just to be compliant
00054 // with the spec.
00055 CORBA::Any *
00056 TAO_ClientRequestInfo::received_exception (ACE_ENV_SINGLE_ARG_DECL)
00057   ACE_THROW_SPEC ((CORBA::SystemException))
00058 {
00059   this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
00060   ACE_CHECK_RETURN (0);
00061 
00062   return this->info_->received_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
00063 }
00064 
00065 char *
00066 TAO_ClientRequestInfo::received_exception_id (
00067     ACE_ENV_SINGLE_ARG_DECL)
00068   ACE_THROW_SPEC ((CORBA::SystemException))
00069 {
00070   this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
00071   ACE_CHECK_RETURN (0);
00072 
00073   return this->info_->received_exception_id (ACE_ENV_SINGLE_ARG_PARAMETER);
00074 }
00075 
00076 IOP::TaggedComponent *
00077 TAO_ClientRequestInfo::get_effective_component (
00078     IOP::ComponentId id
00079     ACE_ENV_ARG_DECL)
00080   ACE_THROW_SPEC ((CORBA::SystemException))
00081 {
00082   this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
00083   ACE_CHECK_RETURN (0);
00084 
00085   return this->info_->get_effective_component (id
00086                                                ACE_ENV_ARG_PARAMETER);
00087 }
00088 
00089 IOP::TaggedComponentSeq *
00090 TAO_ClientRequestInfo::get_effective_components (
00091     IOP::ComponentId id
00092     ACE_ENV_ARG_DECL)
00093   ACE_THROW_SPEC ((CORBA::SystemException))
00094 {
00095   this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
00096   ACE_CHECK_RETURN (0);
00097 
00098   return this->info_->get_effective_components (id
00099                                                 ACE_ENV_ARG_PARAMETER);
00100 }
00101 
00102 CORBA::Policy_ptr
00103 TAO_ClientRequestInfo::get_request_policy (CORBA::PolicyType type
00104                                            ACE_ENV_ARG_DECL)
00105   ACE_THROW_SPEC ((CORBA::SystemException))
00106 {
00107   this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
00108   ACE_CHECK_RETURN (CORBA::Policy::_nil ());
00109 
00110   return this->info_->get_request_policy (type
00111                                           ACE_ENV_ARG_PARAMETER);
00112 }
00113 
00114 void
00115 TAO_ClientRequestInfo::add_request_service_context (
00116     const IOP::ServiceContext & service_context,
00117     CORBA::Boolean replace
00118     ACE_ENV_ARG_DECL)
00119   ACE_THROW_SPEC ((CORBA::SystemException))
00120 {
00121   this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
00122   ACE_CHECK;
00123 
00124   this->info_->add_request_service_context (service_context,
00125                                             replace
00126                                             ACE_ENV_ARG_PARAMETER);
00127   ACE_CHECK;
00128 }
00129 
00130 CORBA::ULong
00131 TAO_ClientRequestInfo::request_id (ACE_ENV_SINGLE_ARG_DECL)
00132   ACE_THROW_SPEC ((CORBA::SystemException))
00133 {
00134   this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
00135   ACE_CHECK_RETURN (0);
00136 
00137   return this->info_->request_id (ACE_ENV_SINGLE_ARG_PARAMETER);
00138 }
00139 
00140 char *
00141 TAO_ClientRequestInfo::operation (ACE_ENV_SINGLE_ARG_DECL)
00142   ACE_THROW_SPEC ((CORBA::SystemException))
00143 {
00144   this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
00145   ACE_CHECK_RETURN (0);
00146 
00147   return this->info_->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
00148 }
00149 
00150 Dynamic::ParameterList *
00151 TAO_ClientRequestInfo::arguments (ACE_ENV_SINGLE_ARG_DECL)
00152   ACE_THROW_SPEC ((CORBA::SystemException))
00153 {
00154   this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
00155   ACE_CHECK_RETURN (0);
00156 
00157   return this->info_->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
00158 }
00159 
00160 Dynamic::ExceptionList *
00161 TAO_ClientRequestInfo::exceptions (ACE_ENV_SINGLE_ARG_DECL)
00162   ACE_THROW_SPEC ((CORBA::SystemException))
00163 {
00164   this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
00165   ACE_CHECK_RETURN (0);
00166 
00167   return this->info_->exceptions (ACE_ENV_SINGLE_ARG_PARAMETER);
00168 }
00169 
00170 Dynamic::ContextList *
00171 TAO_ClientRequestInfo::contexts (ACE_ENV_SINGLE_ARG_DECL)
00172   ACE_THROW_SPEC ((CORBA::SystemException))
00173 {
00174   this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
00175   ACE_CHECK_RETURN (0);
00176 
00177   return this->info_->contexts (ACE_ENV_SINGLE_ARG_PARAMETER);
00178 }
00179 
00180 Dynamic::RequestContext *
00181 TAO_ClientRequestInfo::operation_context (ACE_ENV_SINGLE_ARG_DECL)
00182   ACE_THROW_SPEC ((CORBA::SystemException))
00183 {
00184   this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
00185   ACE_CHECK_RETURN (0);
00186 
00187   return this->info_->operation_context (ACE_ENV_SINGLE_ARG_PARAMETER);
00188 }
00189 
00190 CORBA::Any *
00191 TAO_ClientRequestInfo::result (ACE_ENV_SINGLE_ARG_DECL)
00192   ACE_THROW_SPEC ((CORBA::SystemException))
00193 {
00194   this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
00195   ACE_CHECK_RETURN (0);
00196 
00197   return this->info_->result (ACE_ENV_SINGLE_ARG_PARAMETER);
00198 }
00199 
00200 CORBA::Boolean
00201 TAO_ClientRequestInfo::response_expected (ACE_ENV_SINGLE_ARG_DECL)
00202   ACE_THROW_SPEC ((CORBA::SystemException))
00203 {
00204   this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
00205   ACE_CHECK_RETURN (0);
00206 
00207   return this->info_->response_expected (ACE_ENV_SINGLE_ARG_PARAMETER);
00208 }
00209 
00210 Messaging::SyncScope
00211 TAO_ClientRequestInfo::sync_scope (ACE_ENV_SINGLE_ARG_DECL)
00212   ACE_THROW_SPEC ((CORBA::SystemException))
00213 {
00214   this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
00215   ACE_CHECK_RETURN (0);
00216 
00217   return this->info_->sync_scope (ACE_ENV_SINGLE_ARG_PARAMETER);
00218 }
00219 
00220 PortableInterceptor::ReplyStatus
00221 TAO_ClientRequestInfo::reply_status (ACE_ENV_SINGLE_ARG_DECL)
00222   ACE_THROW_SPEC ((CORBA::SystemException))
00223 {
00224   this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
00225   ACE_CHECK_RETURN (PortableInterceptor::SYSTEM_EXCEPTION);
00226 
00227   return this->info_->reply_status (ACE_ENV_SINGLE_ARG_PARAMETER);
00228 }
00229 
00230 CORBA::Object_ptr
00231 TAO_ClientRequestInfo::forward_reference (ACE_ENV_SINGLE_ARG_DECL)
00232   ACE_THROW_SPEC ((CORBA::SystemException))
00233 {
00234   this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
00235   ACE_CHECK_RETURN (CORBA::Object::_nil ());
00236 
00237   return this->info_->forward_reference (ACE_ENV_SINGLE_ARG_PARAMETER);
00238 }
00239 
00240 CORBA::Any *
00241 TAO_ClientRequestInfo::get_slot (PortableInterceptor::SlotId id
00242                                  ACE_ENV_ARG_DECL)
00243   ACE_THROW_SPEC ((CORBA::SystemException,
00244                    PortableInterceptor::InvalidSlot))
00245 {
00246   this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
00247   ACE_CHECK_RETURN (0);
00248 
00249   return this->info_->get_slot (id
00250                                 ACE_ENV_ARG_PARAMETER);
00251 }
00252 
00253 IOP::ServiceContext *
00254 TAO_ClientRequestInfo::get_request_service_context (
00255     IOP::ServiceId id
00256     ACE_ENV_ARG_DECL)
00257   ACE_THROW_SPEC ((CORBA::SystemException))
00258 {
00259   this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
00260   ACE_CHECK_RETURN (0);
00261 
00262   return this->info_->get_request_service_context (id
00263                                                    ACE_ENV_ARG_PARAMETER);
00264 }
00265 
00266 IOP::ServiceContext *
00267 TAO_ClientRequestInfo::get_reply_service_context (
00268     IOP::ServiceId id
00269     ACE_ENV_ARG_DECL)
00270   ACE_THROW_SPEC ((CORBA::SystemException))
00271 {
00272   this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
00273   ACE_CHECK_RETURN (0);
00274 
00275   return this->info_->get_reply_service_context (id
00276                                                  ACE_ENV_ARG_PARAMETER);
00277 }
00278 
00279 TAO_GIOP_Invocation *
00280 TAO_ClientRequestInfo::invocation (void)
00281 {
00282   return this->invocation_;
00283 }
00284 
00285 // -------------------------------------------------------------------
00286 
00287 
00288 TAO_ClientRequestInfo_Guard::~TAO_ClientRequestInfo_Guard (void)
00289 {
00290   // Restore the previous request information into the TSS object.
00291   // Note that no TSS access occurs here.
00292   if (this->info_ != 0)
00293     this->info_->info (this->previous_info_);
00294 }
00295 
00296 
00297 #endif /* TAO_HAS_INTERCEPTORS == 1 */

Generated on Mon Jun 16 13:48:04 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002