SL2_EstablishTrustPolicy.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 // ===================================================================
00004 /**
00005  *  @file   SL2_EstablishTrustPolicy.h
00006  *
00007  *  SL2_EstablishTrustPolicy.h,v 1.4 2006/03/14 06:14:35 jtc Exp
00008  *
00009  *  @author Ossama Othman <ossama@uci.edu>
00010  */
00011 // ===================================================================
00012 
00013 
00014 #ifndef TAO_ESTABLISH_TRUST_POLICY_H
00015 #define TAO_ESTABLISH_TRUST_POLICY_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/SecurityLevel2C.h"
00026 
00027 #include "tao/LocalObject.h"
00028 
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030 
00031 namespace TAO
00032 {
00033   namespace Security
00034   {
00035 
00036     /**
00037      * @class EstablishTrustPolicy
00038      *
00039      * @brief Implementation of the
00040      *        SecurityLevel2::EstablishTrustPolicy.
00041      *
00042      * This policy can be used to enable or disable establishment of
00043      * trust in the client or the target or both on a per-object
00044      * basis.  For example, it can be set as a policy override using
00045      * the standard CORBA::Object::_set_policy_overrides() method.
00046      @par
00047      * This policy can be created by using the
00048      * CORBA::ORB::create_policy() method by passing it the
00049      * Security::SecEstablishTrustPolicy policy type, and the
00050      *
00051      * appropriate Security::EstablishTrust structure (inserted into a
00052      * CORBA::Any).
00053      */
00054     class EstablishTrustPolicy
00055       : public virtual SecurityLevel2::EstablishTrustPolicy,
00056         public virtual TAO_Local_RefCounted_Object
00057     {
00058     public:
00059 
00060       /// Constructor
00061       EstablishTrustPolicy (const ::Security::EstablishTrust &trust);
00062 
00063       /**
00064        * @name CORBA::Policy Methods
00065        */
00066       //@{
00067       virtual CORBA::PolicyType policy_type (ACE_ENV_SINGLE_ARG_DECL)
00068         ACE_THROW_SPEC ((CORBA::SystemException));
00069 
00070       virtual CORBA::Policy_ptr copy (ACE_ENV_SINGLE_ARG_DECL)
00071         ACE_THROW_SPEC ((CORBA::SystemException));
00072 
00073       virtual void destroy (ACE_ENV_SINGLE_ARG_DECL)
00074         ACE_THROW_SPEC ((CORBA::SystemException));
00075       //@}
00076 
00077       /// Return the "establish trust" value associated with this
00078       /// policy.
00079       virtual ::Security::EstablishTrust trust (ACE_ENV_SINGLE_ARG_DECL)
00080         ACE_THROW_SPEC ((CORBA::SystemException));
00081 
00082     protected:
00083 
00084       /// Destructor
00085       /**
00086        * Protected destructor to enforce proper memory management
00087        * through the reference counting mechanism.
00088        */
00089       ~EstablishTrustPolicy (void);
00090 
00091     private:
00092 
00093       /// Quality of protection which can be specified for an object
00094       /// reference and used to protect messages.
00095       ::Security::EstablishTrust const trust_;
00096 
00097     };
00098 
00099   } // End Security namespace
00100 }  // End TAO namespace
00101 
00102 TAO_END_VERSIONED_NAMESPACE_DECL
00103 
00104 #include /**/ "ace/post.h"
00105 
00106 #endif  /* TAO_ESTABLISH_TRUST_POLICY_H */

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