00001 // -*- C++ -*- 00002 00003 // =================================================================== 00004 /** 00005 * @file SSLIOP_Invocation_Interceptor.h 00006 * 00007 * SSLIOP_Invocation_Interceptor.h,v 1.14 2006/03/14 06:14:35 jtc Exp 00008 * 00009 * @author Ossama Othman <ossama@uci.edu> 00010 */ 00011 // =================================================================== 00012 00013 #ifndef TAO_SSLIOP_INVOCATION_INTERCEPTOR_H 00014 #define TAO_SSLIOP_INVOCATION_INTERCEPTOR_H 00015 00016 #include /**/ "ace/pre.h" 00017 00018 #include "orbsvcs/SSLIOP/SSLIOP_Export.h" 00019 00020 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00021 # pragma once 00022 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00023 00024 #include "orbsvcs/SSLIOPC.h" 00025 #include "tao/PortableInterceptorC.h" 00026 #include "tao/PI_Server/PI_Server.h" 00027 #include "tao/LocalObject.h" 00028 00029 // This is to remove "inherits via dominance" warnings from MSVC. 00030 // MSVC is being a little too paranoid. 00031 #if defined (_MSC_VER) 00032 #pragma warning(push) 00033 #pragma warning(disable:4250) 00034 #endif /* _MSC_VER */ 00035 00036 00037 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00038 00039 namespace TAO 00040 { 00041 namespace SSLIOP 00042 { 00043 /** 00044 * @class Server_Invocation_Interceptor 00045 * 00046 * @brief Secure invocation server request interceptor. 00047 * 00048 * This server request interceptor rejects insecure request 00049 * invocations if the effective target object policy requires 00050 * secure invocations. 00051 */ 00052 class Server_Invocation_Interceptor 00053 : public virtual PortableInterceptor::ServerRequestInterceptor, 00054 public virtual TAO_Local_RefCounted_Object 00055 { 00056 public: 00057 00058 /// Constructor. 00059 Server_Invocation_Interceptor (::SSLIOP::Current_ptr current, 00060 ::Security::QOP qop); 00061 00062 /** 00063 * @name PortableInterceptor::ServerRequestInterceptor Methods 00064 * 00065 * Methods required by the 00066 * PortableInterceptor::ServerRequestInterceptor interface. 00067 */ 00068 //@{ 00069 virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) 00070 ACE_THROW_SPEC ((CORBA::SystemException)); 00071 00072 virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) 00073 ACE_THROW_SPEC ((CORBA::SystemException)); 00074 00075 virtual void receive_request_service_contexts ( 00076 PortableInterceptor::ServerRequestInfo_ptr ri 00077 ACE_ENV_ARG_DECL_WITH_DEFAULTS) 00078 ACE_THROW_SPEC ((CORBA::SystemException, 00079 PortableInterceptor::ForwardRequest)); 00080 00081 virtual void receive_request ( 00082 PortableInterceptor::ServerRequestInfo_ptr ri 00083 ACE_ENV_ARG_DECL_WITH_DEFAULTS) 00084 ACE_THROW_SPEC ((CORBA::SystemException, 00085 PortableInterceptor::ForwardRequest)); 00086 00087 virtual void send_reply ( 00088 PortableInterceptor::ServerRequestInfo_ptr ri 00089 ACE_ENV_ARG_DECL_WITH_DEFAULTS) 00090 ACE_THROW_SPEC ((CORBA::SystemException)); 00091 00092 virtual void send_exception ( 00093 PortableInterceptor::ServerRequestInfo_ptr ri 00094 ACE_ENV_ARG_DECL_WITH_DEFAULTS) 00095 ACE_THROW_SPEC ((CORBA::SystemException, 00096 PortableInterceptor::ForwardRequest)); 00097 00098 virtual void send_other ( 00099 PortableInterceptor::ServerRequestInfo_ptr ri 00100 ACE_ENV_ARG_DECL_WITH_DEFAULTS) 00101 ACE_THROW_SPEC ((CORBA::SystemException, 00102 PortableInterceptor::ForwardRequest)); 00103 //@} 00104 00105 protected: 00106 00107 /// Destructor 00108 /** 00109 * Protected destructor to force deallocation by the reference 00110 * counting mechanism. 00111 */ 00112 ~Server_Invocation_Interceptor (void); 00113 00114 private: 00115 00116 /** 00117 * @name Copying and Assignment 00118 * 00119 * Protected to prevent copying through the copy constructor and the 00120 * assignment operator. 00121 */ 00122 //@{ 00123 Server_Invocation_Interceptor (const Server_Invocation_Interceptor &); 00124 void operator= (const Server_Invocation_Interceptor &); 00125 //@} 00126 00127 private: 00128 00129 /// Reference to the current SSLIOP execution context. 00130 ::SSLIOP::Current_var ssliop_current_; 00131 00132 /// The default quality-of-protection settings in use. 00133 ::Security::QOP qop_; 00134 00135 }; 00136 00137 } // End SSLIOP namespace. 00138 } // End TAO namespace. 00139 00140 TAO_END_VERSIONED_NAMESPACE_DECL 00141 00142 #if defined (_MSC_VER) 00143 #pragma warning(pop) 00144 #endif /* _MSC_VER */ 00145 00146 #include /**/ "ace/post.h" 00147 00148 #endif /* TAO_SSLIOP_INVOCATION_INTERCEPTOR_H */