diff options
Diffstat (limited to 'TAO/tao/PI/ClientRequestInterceptor_Adapter_Impl.cpp')
-rw-r--r-- | TAO/tao/PI/ClientRequestInterceptor_Adapter_Impl.cpp | 96 |
1 files changed, 22 insertions, 74 deletions
diff --git a/TAO/tao/PI/ClientRequestInterceptor_Adapter_Impl.cpp b/TAO/tao/PI/ClientRequestInterceptor_Adapter_Impl.cpp index 741d185e2b9..574fc987085 100644 --- a/TAO/tao/PI/ClientRequestInterceptor_Adapter_Impl.cpp +++ b/TAO/tao/PI/ClientRequestInterceptor_Adapter_Impl.cpp @@ -1,12 +1,12 @@ -#include "tao/PI/ClientRequestInterceptor_Adapter_Impl.h" +#include "ClientRequestInterceptor_Adapter_Impl.h" #if TAO_HAS_INTERCEPTORS == 1 #if !defined (__ACE_INLINE__) -#include "tao/PI/ClientRequestInterceptor_Adapter_Impl.inl" +#include "ClientRequestInterceptor_Adapter_Impl.inl" #endif /* defined INLINE */ -#include "tao/PI/ClientRequestInfo.h" +#include "ClientRequestInfo.h" #include "tao/Invocation_Base.h" #include "tao/ORB_Core.h" @@ -17,8 +17,6 @@ ACE_RCSID (PI, ClientRequestInterceptorAdapter_Impl, "$Id$") -TAO_BEGIN_VERSIONED_NAMESPACE_DECL - namespace TAO { void @@ -28,25 +26,16 @@ namespace TAO { // This method implements one of the "starting" client side // interception point. - - bool is_remote_request = invocation.is_remote_request(); - ACE_TRY { TAO_ClientRequestInfo ri (&invocation); for (size_t i = 0 ; i < this->interceptor_list_.size (); ++i) { - ClientRequestInterceptor_List::RegisteredInterceptor& registered = - this->interceptor_list_.registered_interceptor (i); - - if (registered.details_.should_be_processed (is_remote_request)) - { - registered.interceptor_-> - send_request (&ri - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } + this->interceptor_list_.interceptor (i)-> + send_request (&ri + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; // The starting interception point completed successfully. // Push the interceptor on to the flow stack. @@ -72,8 +61,6 @@ namespace TAO // This is an "ending" interception point so we only process the // interceptors pushed on to the flow stack. - bool is_remote_request = invocation.is_remote_request(); - // Notice that the interceptors are processed in the opposite order // they were pushed onto the stack since this is an "ending" // interception point. @@ -90,18 +77,11 @@ namespace TAO // invoked in another "ending" interception point. --invocation.stack_size (); - ClientRequestInterceptor_List::RegisteredInterceptor& registered = - this->interceptor_list_.registered_interceptor ( - invocation.stack_size ()); - - if (registered.details_.should_be_processed (is_remote_request)) - { - registered.interceptor_-> - receive_reply ( - &ri - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } + this->interceptor_list_.interceptor (invocation.stack_size ())-> + receive_reply ( + &ri + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; } // The receive_reply() interception point does not raise a @@ -117,8 +97,6 @@ namespace TAO // This is an "ending" interception point so we only process the // interceptors pushed on to the flow stack. - bool is_remote_request = invocation.is_remote_request(); - // Notice that the interceptors are processed in the opposite order // they were pushed onto the stack since this is an "ending" // interception point. @@ -136,18 +114,11 @@ namespace TAO // being invoked in another "ending" interception point. --invocation.stack_size (); - ClientRequestInterceptor_List::RegisteredInterceptor& registered = - this->interceptor_list_.registered_interceptor ( - invocation.stack_size ()); - - if (registered.details_.should_be_processed (is_remote_request)) - { - registered.interceptor_-> - receive_exception ( - &ri - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } + this->interceptor_list_.interceptor (invocation.stack_size ())-> + receive_exception ( + &ri + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; } } ACE_CATCH (PortableInterceptor::ForwardRequest, exc) @@ -196,8 +167,6 @@ namespace TAO // This is an "ending" interception point so we only process the // interceptors pushed on to the flow stack. - bool is_remote_request = invocation.is_remote_request(); - // Notice that the interceptors are processed in the opposite order // they were pushed onto the stack since this is an "ending" // interception point. @@ -216,18 +185,11 @@ namespace TAO // being invoked in another "ending" interception point. --invocation.stack_size (); - ClientRequestInterceptor_List::RegisteredInterceptor& registered = - this->interceptor_list_.registered_interceptor ( - invocation.stack_size ()); - - if (registered.details_.should_be_processed (is_remote_request)) - { - registered.interceptor_-> - receive_other ( - &ri - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } + this->interceptor_list_.interceptor (invocation.stack_size ())-> + receive_other ( + &ri + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; } } ACE_CATCH (PortableInterceptor::ForwardRequest, exc) @@ -265,18 +227,6 @@ namespace TAO } void - ClientRequestInterceptor_Adapter_Impl::add_interceptor ( - PortableInterceptor::ClientRequestInterceptor_ptr interceptor, - const CORBA::PolicyList& policies - ACE_ENV_ARG_DECL) - { - this->interceptor_list_.add_interceptor (interceptor, - policies - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } - - void ClientRequestInterceptor_Adapter_Impl::destroy_interceptors ( ACE_ENV_SINGLE_ARG_DECL) { @@ -316,6 +266,4 @@ namespace TAO } } -TAO_END_VERSIONED_NAMESPACE_DECL - #endif /* TAO_HAS_INTERCEPTORS == 1 */ |