TAO::SL3::CredentialsCurator Class Reference

Implementation of the SecurityLevel3::CredentialsCurator object. More...

#include <SL3_CredentialsCurator.h>

Inheritance diagram for TAO::SL3::CredentialsCurator:

Inheritance graph
[legend]
Collaboration diagram for TAO::SL3::CredentialsCurator:

Collaboration graph
[legend]
List of all members.

Public Types

typedef CredentialsCurator_ptr _ptr_type
typedef CredentialsCurator_var _var_type
typedef CredentialsCurator_out _out_type
typedef ACE_Map_Manager< const
char *, TAO::SL3::CredentialsAcquirerFactory *,
ACE_Null_Mutex
Acquirer_Factory_Table
typedef Acquirer_Factory_Table::iterator Factory_Iterator
typedef ACE_Hash_Map_Manager_Ex<
const char *, SecurityLevel3::OwnCredentials_var,
ACE_Hash< const char * >,
ACE_Equal_To< const char * >,
ACE_Null_Mutex
Credentials_Table
typedef Credentials_Table::iterator Credentials_Iterator

Public Member Functions

 CredentialsCurator (void)
 Constructor.

void register_acquirer_factory (const char *acquisition_method, TAO::SL3::CredentialsAcquirerFactory *factory)
 Register CredentialsAcquirer factory.

void _tao_add_own_credentials (SecurityLevel3::OwnCredentials_ptr credentials)
SecurityLevel3::CredentialsCurator Methods
Methods required by the SecurityLevel3::CredentialsCurator interface.

virtual SecurityLevel3::AcquisitionMethodList * supported_methods () throw (CORBA::SystemException)
virtual SecurityLevel3::CredentialsAcquirer_ptr acquire_credentials (const char *acquisition_method, const CORBA::Any &acquisition_arguments) throw (CORBA::SystemException)
virtual SecurityLevel3::OwnCredentialsList * default_creds_list () throw (CORBA::SystemException)
virtual SecurityLevel3::CredentialsIdList * default_creds_ids () throw (CORBA::SystemException)
virtual SecurityLevel3::OwnCredentials_ptr get_own_credentials (const char *credentials_id) throw (CORBA::SystemException)
virtual void release_own_credentials (const char *credentials_id) throw (CORBA::SystemException)

Static Public Member Functions

CredentialsCurator_ptr _duplicate (CredentialsCurator_ptr obj)
CredentialsCurator_ptr _nil (void)
CredentialsCurator_ptr _narrow (CORBA::Object_ptr obj)

Protected Member Functions

 ~CredentialsCurator (void)
 Destructor.


Private Attributes

TAO_SYNCH_MUTEX lock_
 Lock used to synchronize access to underlying tables.

Acquirer_Factory_Table acquirer_factories_
 Table of CredentialsAcquirer factories.

Credentials_Table credentials_table_
 Table of OwnCredentials.


Detailed Description

Implementation of the SecurityLevel3::CredentialsCurator object.

This class provides a means for creating and managing OwnCredentials.

Definition at line 60 of file SL3_CredentialsCurator.h.


Member Typedef Documentation

typedef CredentialsCurator_out TAO::SL3::CredentialsCurator::_out_type
 

Reimplemented from CORBA::LocalObject.

Definition at line 67 of file SL3_CredentialsCurator.h.

typedef CredentialsCurator_ptr TAO::SL3::CredentialsCurator::_ptr_type
 

Reimplemented from CORBA::LocalObject.

Definition at line 65 of file SL3_CredentialsCurator.h.

typedef CredentialsCurator_var TAO::SL3::CredentialsCurator::_var_type
 

Reimplemented from CORBA::LocalObject.

Definition at line 66 of file SL3_CredentialsCurator.h.

typedef ACE_Map_Manager<const char *, TAO::SL3::CredentialsAcquirerFactory *, ACE_Null_Mutex> TAO::SL3::CredentialsCurator::Acquirer_Factory_Table
 

The type of table that maps acquisition method to acquirer factory.

Definition at line 75 of file SL3_CredentialsCurator.h.

typedef Credentials_Table::iterator TAO::SL3::CredentialsCurator::Credentials_Iterator
 

Definition at line 83 of file SL3_CredentialsCurator.h.

Referenced by ~CredentialsCurator().

typedef ACE_Hash_Map_Manager_Ex<const char *, SecurityLevel3::OwnCredentials_var, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex> TAO::SL3::CredentialsCurator::Credentials_Table
 

Definition at line 82 of file SL3_CredentialsCurator.h.

typedef Acquirer_Factory_Table::iterator TAO::SL3::CredentialsCurator::Factory_Iterator
 

Definition at line 76 of file SL3_CredentialsCurator.h.

Referenced by ~CredentialsCurator().


Constructor & Destructor Documentation

TAO::SL3::CredentialsCurator::CredentialsCurator void   ) 
 

Constructor.

Definition at line 21 of file SL3_CredentialsCurator.cpp.

00022   : lock_ (),
00023     acquirer_factories_ (),
00024     credentials_table_ (TAO::SL3::CREDENTIALS_TABLE_SIZE)
00025 {
00026 }

TAO::SL3::CredentialsCurator::~CredentialsCurator void   )  [protected]
 

Destructor.

Protected destructor to enforce proper memory management through the reference counting mechanism.

Definition at line 28 of file SL3_CredentialsCurator.cpp.

References acquirer_factories_, ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::begin(), ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::begin(), ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::close(), ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::close(), Credentials_Iterator, credentials_table_, ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::end(), ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::end(), Factory_Iterator, and CORBA::string_free().

00029 {
00030   const Factory_Iterator fend = this->acquirer_factories_.end ();
00031   for (Factory_Iterator i = this->acquirer_factories_.begin ();
00032        i != fend;
00033        ++i)
00034     {
00035       // Deallocate the Acquistion Method.
00036       CORBA::string_free (const_cast<char *> ((*i).ext_id_));
00037 
00038       delete (*i).int_id_;
00039     }
00040 
00041   this->acquirer_factories_.close ();
00042 
00043   const Credentials_Iterator end = this->credentials_table_.end ();
00044   for (Credentials_Iterator j = this->credentials_table_.begin ();
00045        j != end;
00046        ++j)
00047     {
00048       // Deallocate the CredentialsId.
00049       CORBA::string_free (const_cast<char *> ((*j).ext_id_));
00050     }
00051 
00052   this->credentials_table_.close ();
00053 }


Member Function Documentation

TAO::SL3::CredentialsCurator_ptr TAO::SL3::CredentialsCurator::_duplicate CredentialsCurator_ptr  obj  )  [static]
 

Definition at line 56 of file SL3_CredentialsCurator.cpp.

References TAO_Local_RefCounted_Object::_add_ref(), TAO::SL3::CredentialsCurator_ptr, and CORBA::is_nil().

Referenced by _narrow().

00057 {
00058   if (!CORBA::is_nil (obj))
00059     obj->_add_ref ();
00060 
00061   return obj;
00062 }

TAO::SL3::CredentialsCurator_ptr TAO::SL3::CredentialsCurator::_narrow CORBA::Object_ptr  obj  )  [static]
 

Reimplemented from CORBA::LocalObject.

Definition at line 65 of file SL3_CredentialsCurator.cpp.

References _duplicate().

00067 {
00068   return TAO::SL3::CredentialsCurator::_duplicate (
00069              dynamic_cast<TAO::SL3::CredentialsCurator *> (obj));
00070 }

TAO::SL3::CredentialsCurator_ptr TAO::SL3::CredentialsCurator::_nil void   )  [static]
 

Reimplemented from CORBA::LocalObject.

Definition at line 73 of file SL3_CredentialsCurator.cpp.

00074 {
00075   return (CredentialsCurator *) 0;
00076 }

void TAO::SL3::CredentialsCurator::_tao_add_own_credentials SecurityLevel3::OwnCredentials_ptr  credentials  ) 
 

TAO-specific means of adding credentials to this CredentialsCurator's "own credentials" list.

Definition at line 263 of file SL3_CredentialsCurator.cpp.

References ACE_CHECK, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_THROW, ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::bind(), and credentials_table_.

00266 {
00267   CORBA::String_var credentials_id =
00268     credentials->creds_id (ACE_ENV_SINGLE_ARG_PARAMETER);
00269   ACE_CHECK;
00270 
00271   SecurityLevel3::OwnCredentials_var creds =
00272     SecurityLevel3::OwnCredentials::_duplicate (credentials);
00273 
00274   if (this->credentials_table_.bind (credentials_id.in (),
00275                                      creds) != 0)
00276     {
00277       ACE_THROW (CORBA::NO_RESOURCES ());
00278     }
00279 
00280  // CredentialsCurator nows owns the id.
00281   (void) credentials_id._retn ();
00282 }

virtual SecurityLevel3::CredentialsAcquirer_ptr TAO::SL3::CredentialsCurator::acquire_credentials const char *  acquisition_method,
const CORBA::Any &  acquisition_arguments
throw (CORBA::SystemException) [virtual]
 

virtual SecurityLevel3::CredentialsIdList* TAO::SL3::CredentialsCurator::default_creds_ids  )  throw (CORBA::SystemException) [virtual]
 

virtual SecurityLevel3::OwnCredentialsList* TAO::SL3::CredentialsCurator::default_creds_list  )  throw (CORBA::SystemException) [virtual]
 

virtual SecurityLevel3::OwnCredentials_ptr TAO::SL3::CredentialsCurator::get_own_credentials const char *  credentials_id  )  throw (CORBA::SystemException) [virtual]
 

void TAO::SL3::CredentialsCurator::register_acquirer_factory const char *  acquisition_method,
TAO::SL3::CredentialsAcquirerFactory factory
 

Register CredentialsAcquirer factory.

Note:
The CredentialsCurator retains ownership of the factory.

virtual void TAO::SL3::CredentialsCurator::release_own_credentials const char *  credentials_id  )  throw (CORBA::SystemException) [virtual]
 

virtual SecurityLevel3::AcquisitionMethodList* TAO::SL3::CredentialsCurator::supported_methods  )  throw (CORBA::SystemException) [virtual]
 


Member Data Documentation

Acquirer_Factory_Table TAO::SL3::CredentialsCurator::acquirer_factories_ [private]
 

Table of CredentialsAcquirer factories.

Definition at line 159 of file SL3_CredentialsCurator.h.

Referenced by ~CredentialsCurator().

Credentials_Table TAO::SL3::CredentialsCurator::credentials_table_ [private]
 

Table of OwnCredentials.

Definition at line 162 of file SL3_CredentialsCurator.h.

Referenced by _tao_add_own_credentials(), and ~CredentialsCurator().

TAO_SYNCH_MUTEX TAO::SL3::CredentialsCurator::lock_ [private]
 

Lock used to synchronize access to underlying tables.

Definition at line 156 of file SL3_CredentialsCurator.h.


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 13:52:47 2006 for TAO_Security by doxygen 1.3.6