SL3_SecurityCurrent.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  * @file SL3_SecurityCurrent.h
00006  *
00007  * SL3_SecurityCurrent.h,v 1.6 2006/03/14 06:14:35 jtc Exp
00008  *
00009  * @author Ossama Othman <ossama@dre.vanderbilt.edu>
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef TAO_SL3_SECURITY_CURRENT_H
00015 #define TAO_SL3_SECURITY_CURRENT_H
00016 
00017 #include /**/ "ace/pre.h"
00018 
00019 #include "orbsvcs/Security/security_export.h"
00020 
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif /* ACE_LACKS_PRAGMA_ONCE */
00024 
00025 #include "orbsvcs/Security/SL3_SecurityCurrent_Impl.h"
00026 
00027 #include "orbsvcs/SecurityLevel3C.h"
00028 
00029 #include "tao/LocalObject.h"
00030 
00031 #if defined(_MSC_VER)
00032 #pragma warning(push)
00033 #pragma warning(disable:4250)
00034 #endif /* _MSC_VER */
00035 
00036 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00037 
00038 class TAO_ORB_Core;
00039 
00040 namespace TAO
00041 {
00042   namespace SL3
00043   {
00044     /**
00045      * @class SecurityCurrent
00046      *
00047      * @brief SecurityLevel3::SecurityCurrent implementation.
00048      *
00049      * Thread-specific information may be retrieved from the target
00050      * security service through this object.
00051      *
00052      * @note This SecurityCurrent implementation basically a variant
00053      *       of the bridge design pattern.  All operations are
00054      *       delegated on to concrete implementations.
00055      */
00056     class TAO_Security_Export SecurityCurrent
00057       : public virtual SecurityLevel3::SecurityCurrent,
00058         public virtual TAO_Local_RefCounted_Object
00059     {
00060     public:
00061 
00062       /// Constructor
00063       SecurityCurrent (size_t tss_slot, TAO_ORB_Core * oc);
00064 
00065       /**
00066        * @name SecurityLevel3::SecurityCurrent Methods
00067        *
00068        * Methods required by the SecurityLevel3::SecurityCurrent
00069        * interface.
00070        */
00071       //@{
00072       virtual SecurityLevel3::ClientCredentials_ptr client_credentials (
00073           ACE_ENV_SINGLE_ARG_DECL)
00074         ACE_THROW_SPEC ((CORBA::SystemException));
00075 
00076       virtual CORBA::Boolean request_is_local (ACE_ENV_SINGLE_ARG_DECL)
00077         ACE_THROW_SPEC ((CORBA::SystemException));
00078       //@}
00079 
00080       /// Return the TSS slot ID assigned to the "SecurityCurrent"
00081       /// object.
00082       /**
00083        * The concrete thread-specific storage SecurityCurrent
00084        * implementations will each use this slot ID.
00085        */
00086       size_t tss_slot (void) const;
00087 
00088     protected:
00089 
00090       /// Destructor
00091       /**
00092        * Protected destructor to enforce proper memory management
00093        * through the reference counting mechanism.
00094        */
00095       ~SecurityCurrent (void);
00096 
00097     private:
00098 
00099       /// Set the thread-specific storage
00100       /// SecurityLevel3::SecurityCurrent implementation.
00101       /**
00102        * The pointer is actually one to a concrete implementation provided
00103        * by the underlying security mechanism.  For example, SSLIOP
00104        * implements its own SSLIOP-specific operations corresponding
00105        * to the ones exposed by the SecurityCurrent interface.
00106        * Similarly, SECIOP would do the same.
00107        * @par
00108        * There is no function that places the implementation pointer
00109        * in TSS.  The underlying security mechanism does that.
00110        */
00111       SecurityCurrent_Impl * implementation (void);
00112 
00113     private:
00114 
00115       /**
00116        * @name Retricted Copying and Assignment
00117        *
00118        * Prevent copying through the copy constructor and the
00119        * assignment operator.
00120        */
00121       //@{
00122       SecurityCurrent (const SecurityCurrent &);
00123       void operator= (const SecurityCurrent &);
00124       //@}
00125 
00126     private:
00127 
00128       /// Thread-specific storage slot assigned to this object.
00129       const size_t tss_slot_;
00130 
00131       /// Pointer to the ORB Core corresponding to the ORB with which
00132       /// this object is registered.
00133       TAO_ORB_Core * const orb_core_;
00134 
00135     };
00136 
00137   } // End SL3 namespace
00138 }  // End TAO namespace
00139 
00140 TAO_END_VERSIONED_NAMESPACE_DECL
00141 
00142 #if defined (__ACE_INLINE__)
00143 # include "orbsvcs/Security/SL3_SecurityCurrent.inl"
00144 #endif /* __ACE_INLINE__ */
00145 
00146 #if defined(_MSC_VER)
00147 #pragma warning(pop)
00148 #endif /* _MSC_VER */
00149 
00150 #include /**/ "ace/post.h"
00151 
00152 #endif  /* TAO_SL3_SECURITY_CURRENT_H */

Generated on Thu Nov 9 13:50:48 2006 for TAO_Security by doxygen 1.3.6