00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file ClientRequestDetails.h 00006 * 00007 * $Id: ClientRequestDetails.h 79914 2007-11-01 10:51:19Z johnnyw $ 00008 * 00009 * This file declares a class that manages the details 00010 * about a registered client request interceptor. Policies can be 00011 * used when interceptors are registered, and the policy values 00012 * will be processed and used to modify the values of the 00013 * ClientRequestDetails object associated with the registered 00014 * client request interceptor. 00015 * 00016 * @author Tim Bradley <bradley_t@ociweb.com> 00017 */ 00018 //============================================================================= 00019 00020 #ifndef TAO_CLIENT_REQUEST_DETAILS_H 00021 #define TAO_CLIENT_REQUEST_DETAILS_H 00022 00023 #include /**/ "ace/pre.h" 00024 00025 #include "tao/orbconf.h" 00026 00027 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00028 # pragma once 00029 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00030 00031 #if TAO_HAS_INTERCEPTORS == 1 00032 00033 #include "tao/PI/PI_includeC.h" 00034 00035 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00036 00037 namespace TAO 00038 { 00039 /** 00040 * @class ClientRequestDetails 00041 * 00042 * @brief The policy-driven details for a registered client request 00043 * interceptor 00044 * 00045 * Each time a client request interceptor is registered with an ORB, 00046 * a ClientRequestDetails object will be created and associated with 00047 * the registered client request interceptor. If the interceptor is 00048 * registered with policies, the policies will be used to adjust the 00049 * values in the ClientRequestDetails appropriately. 00050 */ 00051 class ClientRequestDetails 00052 { 00053 public: 00054 00055 ClientRequestDetails (void); 00056 00057 void apply_policies (const CORBA::PolicyList& policies); 00058 00059 /// Returns true if the ProcessingMode setting permits the "firing" 00060 /// of the associated client request interceptor based upon the 00061 /// remote vs. collocated nature of the current servant request 00062 /// that is being dispatched. 00063 bool should_be_processed (bool is_remote_request) const; 00064 00065 private: 00066 00067 /// The ProcessingMode setting that can be adjusted via the 00068 /// PortableInterceptor::ProcessingModePolicy. 00069 PortableInterceptor::ProcessingMode processing_mode_; 00070 }; 00071 } 00072 00073 TAO_END_VERSIONED_NAMESPACE_DECL 00074 00075 #if defined (__ACE_INLINE__) 00076 #include "tao/PI/ClientRequestDetails.inl" 00077 #endif /* __ACE_INLINE__ */ 00078 00079 #endif /* TAO_HAS_INTERCEPTORS == 1 */ 00080 00081 #include /**/ "ace/post.h" 00082 00083 #endif /* TAO_CLIENT_REQUEST_DETAILS_H */