SL3_SecurityCurrent.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  * @file SL3_SecurityCurrent.h
00006  *
00007  * $Id: SL3_SecurityCurrent.h 77001 2007-02-12 07:54:49Z johnnyw $
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 
00074       virtual CORBA::Boolean request_is_local (void);
00075       //@}
00076 
00077       /// Return the TSS slot ID assigned to the "SecurityCurrent"
00078       /// object.
00079       /**
00080        * The concrete thread-specific storage SecurityCurrent
00081        * implementations will each use this slot ID.
00082        */
00083       size_t tss_slot (void) const;
00084 
00085     protected:
00086 
00087       /// Destructor
00088       /**
00089        * Protected destructor to enforce proper memory management
00090        * through the reference counting mechanism.
00091        */
00092       ~SecurityCurrent (void);
00093 
00094     private:
00095 
00096       /// Set the thread-specific storage
00097       /// SecurityLevel3::SecurityCurrent implementation.
00098       /**
00099        * The pointer is actually one to a concrete implementation provided
00100        * by the underlying security mechanism.  For example, SSLIOP
00101        * implements its own SSLIOP-specific operations corresponding
00102        * to the ones exposed by the SecurityCurrent interface.
00103        * Similarly, SECIOP would do the same.
00104        * @par
00105        * There is no function that places the implementation pointer
00106        * in TSS.  The underlying security mechanism does that.
00107        */
00108       SecurityCurrent_Impl * implementation (void);
00109 
00110     private:
00111 
00112       /**
00113        * @name Retricted Copying and Assignment
00114        *
00115        * Prevent copying through the copy constructor and the
00116        * assignment operator.
00117        */
00118       //@{
00119       SecurityCurrent (const SecurityCurrent &);
00120       void operator= (const SecurityCurrent &);
00121       //@}
00122 
00123     private:
00124 
00125       /// Thread-specific storage slot assigned to this object.
00126       const size_t tss_slot_;
00127 
00128       /// Pointer to the ORB Core corresponding to the ORB with which
00129       /// this object is registered.
00130       TAO_ORB_Core * const orb_core_;
00131 
00132     };
00133 
00134   } // End SL3 namespace
00135 }  // End TAO namespace
00136 
00137 TAO_END_VERSIONED_NAMESPACE_DECL
00138 
00139 #if defined (__ACE_INLINE__)
00140 # include "orbsvcs/Security/SL3_SecurityCurrent.inl"
00141 #endif /* __ACE_INLINE__ */
00142 
00143 #if defined(_MSC_VER)
00144 #pragma warning(pop)
00145 #endif /* _MSC_VER */
00146 
00147 #include /**/ "ace/post.h"
00148 
00149 #endif  /* TAO_SL3_SECURITY_CURRENT_H */

Generated on Sun Jan 27 16:09:36 2008 for TAO_Security by doxygen 1.3.6