00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file ServerRequestDetails.h 00006 * 00007 * $Id: ServerRequestDetails.h 79914 2007-11-01 10:51:19Z johnnyw $ 00008 * 00009 * This file declares a class that manages the details 00010 * about a registered server 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 * ServerRequestDetails object associated with the registered 00014 * server request interceptor. 00015 * 00016 * @author Tim Bradley <bradley_t@ociweb.com> 00017 */ 00018 //============================================================================= 00019 00020 #ifndef TAO_SERVER_REQUEST_DETAILS_H 00021 #define TAO_SERVER_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 ServerRequestDetails 00041 * 00042 * @brief The policy-driven details for a registered server request 00043 * interceptor 00044 * 00045 * Each time a server request interceptor is registered with an ORB, 00046 * a ServerRequestDetails object will be created and associated with 00047 * the registered server request interceptor. If the interceptor is 00048 * registered with policies, the policies will be used to adjust the 00049 * values in the ServerRequestDetails appropriately. 00050 */ 00051 class ServerRequestDetails 00052 { 00053 public: 00054 ServerRequestDetails (void); 00055 00056 void apply_policies (const CORBA::PolicyList& policies); 00057 00058 /// Returns true if the ProcessingMode setting permits the "firing" 00059 /// of the associated server request interceptor based upon the 00060 /// remote vs. collocated nature of the current servant request 00061 /// that is being dispatched. 00062 bool should_be_processed (bool is_remote_request) const; 00063 00064 private: 00065 00066 /// The ProcessingMode setting that can be adjusted via the 00067 /// PortableInterceptor::ProcessingModePolicy. 00068 PortableInterceptor::ProcessingMode processing_mode_; 00069 }; 00070 } 00071 00072 TAO_END_VERSIONED_NAMESPACE_DECL 00073 00074 #if defined (__ACE_INLINE__) 00075 #include "tao/PI_Server/ServerRequestDetails.inl" 00076 #endif /* __ACE_INLINE__ */ 00077 00078 #endif /* TAO_HAS_INTERCEPTORS == 1 */ 00079 00080 #include /**/ "ace/post.h" 00081 00082 #endif /* TAO_SERVER_REQUEST_DETAILS_H */