SSLIOP_Invocation_Interceptor.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 // ===================================================================
00004 /**
00005  *  @file   SSLIOP_Invocation_Interceptor.h
00006  *
00007  *  $Id: SSLIOP_Invocation_Interceptor.h 81490 2008-04-28 14:32:24Z johnnyw $
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 "orbsvcs/SecurityLevel2C.h"
00026 #include "tao/PortableInterceptorC.h"
00027 #include "tao/PI/ORBInitInfo.h"
00028 #include "tao/PI_Server/PI_Server.h"
00029 #include "tao/PortableServer/PS_CurrentC.h"
00030 #include "tao/LocalObject.h"
00031 
00032 // This is to remove "inherits via dominance" warnings from MSVC.
00033 // MSVC is being a little too paranoid.
00034 #if defined (_MSC_VER)
00035 #pragma warning(push)
00036 #pragma warning(disable:4250)
00037 #endif /* _MSC_VER */
00038 
00039 
00040 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00041 
00042 namespace TAO
00043 {
00044   namespace SSLIOP
00045   {
00046     /**
00047      * @class Server_Invocation_Interceptor
00048      *
00049      * @brief Secure invocation server request interceptor.
00050      *
00051      * This server request interceptor rejects insecure request
00052      * invocations if the effective target object policy requires
00053      * secure invocations.
00054      */
00055     class Server_Invocation_Interceptor
00056       : public virtual PortableInterceptor::ServerRequestInterceptor,
00057         public virtual ::CORBA::LocalObject
00058     {
00059     public:
00060 
00061       /*!
00062     \brief Constructor.
00063         \param info reference to the ORBInitInfo object so that
00064                     the interceptor can get access to initial references, etc.
00065         \param default_qop the default Quality of Protection
00066     \param tss_slot the TSS slot used by the various security features.
00067       */
00068       Server_Invocation_Interceptor (PortableInterceptor::ORBInitInfo_ptr info,
00069                      ::Security::QOP default_qop,
00070                      size_t tss_slot);
00071 
00072       /**
00073        * @name PortableInterceptor::ServerRequestInterceptor Methods
00074        *
00075        * Methods required by the
00076        * PortableInterceptor::ServerRequestInterceptor interface.
00077        */
00078       //@{
00079       virtual char * name (void);
00080 
00081       virtual void destroy (void);
00082 
00083       virtual void receive_request_service_contexts (
00084           PortableInterceptor::ServerRequestInfo_ptr ri);
00085 
00086       virtual void receive_request (
00087           PortableInterceptor::ServerRequestInfo_ptr ri);
00088 
00089       virtual void send_reply (
00090           PortableInterceptor::ServerRequestInfo_ptr ri);
00091 
00092       virtual void send_exception (
00093           PortableInterceptor::ServerRequestInfo_ptr ri);
00094 
00095       virtual void send_other (
00096           PortableInterceptor::ServerRequestInfo_ptr ri);
00097       //@}
00098 
00099     protected:
00100 
00101       /// Destructor
00102       /**
00103        * Protected destructor to force deallocation by the reference
00104        * counting mechanism.
00105        */
00106       ~Server_Invocation_Interceptor (void);
00107 
00108     private:
00109 
00110       /**
00111        * @name Copying and Assignment
00112        *
00113        * Protected to prevent copying through the copy constructor and the
00114        * assignment operator.
00115        */
00116       //@{
00117       Server_Invocation_Interceptor (const Server_Invocation_Interceptor &);
00118       void operator= (const Server_Invocation_Interceptor &);
00119       //@}
00120 
00121     private:
00122 
00123       /// Reference to the current SSLIOP execution context.
00124       ::SSLIOP::Current_var ssliop_current_;
00125 
00126       /// Reference to the POA current
00127       PortableServer::Current_var poa_current_;
00128 
00129       /// The default quality-of-protection settings in use.
00130       ::Security::QOP qop_;
00131 
00132       /// SecurityLevel2 security manager reference
00133       SecurityLevel2::SecurityManager_var sec2manager_;
00134       SecurityLevel2::Current_var sec2_current_;
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 */

Generated on Tue Feb 2 17:48:44 2010 for TAO_SSLIOP by  doxygen 1.4.7