opensaml-2.4.3
opensaml::saml2md::DynamicMetadataProvider Class Reference

Simple implementation of a dynamic, caching MetadataProvider. More...

#include <saml/saml2/metadata/DynamicMetadataProvider.h>

Inheritance diagram for opensaml::saml2md::DynamicMetadataProvider:
opensaml::saml2md::AbstractMetadataProvider opensaml::saml2md::ObservableMetadataProvider opensaml::saml2md::MetadataProvider

Public Member Functions

 DynamicMetadataProvider (const xercesc::DOMElement *e=nullptr)
 Constructor. More...
 
void init ()
 Should be called after instantiating provider and adding filters, but before performing any lookup operations. More...
 
xmltooling::Lockable * lock ()
 
void unlock ()
 
const xmltooling::XMLObject * getMetadata () const
 Gets the entire metadata tree, after the registered filter has been applied. More...
 
std::pair< const
EntityDescriptor *, const
RoleDescriptor * > 
getEntityDescriptor (const Criteria &criteria) const
 Gets entity metadata based on supplied criteria. More...
 
- Public Member Functions inherited from opensaml::saml2md::AbstractMetadataProvider
void emitChangeEvent () const
 Convenience method for notifying every registered Observer of an event.
 
const EntitiesDescriptor * getEntitiesDescriptor (const char *name, bool requireValidMetadata=true) const
 Gets the metadata for a given group of entities. More...
 
const xmltooling::Credential * resolve (const xmltooling::CredentialCriteria *criteria=nullptr) const
 
std::vector< const
xmltooling::Credential * >
::size_type 
resolve (std::vector< const xmltooling::Credential * > &results, const xmltooling::CredentialCriteria *criteria=nullptr) const
 
- Public Member Functions inherited from opensaml::saml2md::ObservableMetadataProvider
virtual void addObserver (const Observer *newObserver) const
 Adds a metadata observer. More...
 
virtual const ObserverremoveObserver (const Observer *oldObserver) const
 Removes a metadata observer. More...
 
- Public Member Functions inherited from opensaml::saml2md::MetadataProvider
virtual ~MetadataProvider ()
 Destructor will delete any installed filters.
 
virtual void addMetadataFilter (MetadataFilter *newFilter)
 Adds a metadata filter to apply to any resolved metadata. More...
 
virtual MetadataFilterremoveMetadataFilter (MetadataFilter *oldFilter)
 Removes a metadata filter. More...
 
virtual const EntitiesDescriptor * getEntitiesDescriptor (const XMLCh *name, bool requireValidMetadata=true) const
 Gets the metadata for a given group of entities. More...
 

Protected Member Functions

virtual EntityDescriptor * resolve (const Criteria &criteria) const
 Resolves a metadata instance using the supplied criteria. More...
 
- Protected Member Functions inherited from opensaml::saml2md::AbstractMetadataProvider
 AbstractMetadataProvider (const xercesc::DOMElement *e=nullptr)
 Constructor. More...
 
virtual void indexEntity (EntityDescriptor *site, time_t &validUntil, bool replace=false) const
 Loads an entity into the cache for faster lookup. More...
 
virtual void indexGroup (EntitiesDescriptor *group, time_t &validUntil) const
 Loads a group of entities into the cache for faster lookup. More...
 
virtual void index (EntityDescriptor *site, time_t validUntil, bool replace=false) const
 
virtual void index (EntitiesDescriptor *group, time_t validUntil) const
 
virtual void clearDescriptorIndex (bool freeSites=false)
 Clear the cache of known entities and groups. More...
 
- Protected Member Functions inherited from opensaml::saml2md::ObservableMetadataProvider
 ObservableMetadataProvider (const xercesc::DOMElement *e=nullptr)
 Constructor. More...
 
- Protected Member Functions inherited from opensaml::saml2md::MetadataProvider
 MetadataProvider (const xercesc::DOMElement *e=nullptr)
 Constructor. More...
 
void doFilters (xmltooling::XMLObject &xmlObject) const
 Applies any installed filters to a metadata instance. More...
 

Protected Attributes

bool m_validate
 Controls XML schema validation. More...
 
- Protected Attributes inherited from opensaml::saml2md::AbstractMetadataProvider
xmltooling::KeyInfoResolver * m_resolver
 Embedded KeyInfoResolver instance. More...
 

Detailed Description

Simple implementation of a dynamic, caching MetadataProvider.

Constructor & Destructor Documentation

opensaml::saml2md::DynamicMetadataProvider::DynamicMetadataProvider ( const xercesc::DOMElement *  e = nullptr)

Constructor.

Parameters
eDOM to supply configuration for provider

Member Function Documentation

std::pair<const EntityDescriptor*,const RoleDescriptor*> opensaml::saml2md::DynamicMetadataProvider::getEntityDescriptor ( const Criteria criteria) const
virtual

Gets entity metadata based on supplied criteria.

If a valid entity is returned, the provider will be left in a locked state. The caller MUST unlock the provider when finished with the entity.

Parameters
criterialookup criteria
Returns
the entity's metadata (and optionally a role) or nullptr if there is no qualifying metadata

Reimplemented from opensaml::saml2md::AbstractMetadataProvider.

const xmltooling::XMLObject* opensaml::saml2md::DynamicMetadataProvider::getMetadata ( ) const
virtual

Gets the entire metadata tree, after the registered filter has been applied.

The caller MUST unlock the provider when finished with the data.

Returns
the entire metadata tree

Implements opensaml::saml2md::MetadataProvider.

void opensaml::saml2md::DynamicMetadataProvider::init ( )
virtual

Should be called after instantiating provider and adding filters, but before performing any lookup operations.

Allows the provider to defer initialization processes that are likely to result in exceptions until after the provider is safely created. Providers SHOULD perform as much processing as possible in this method so as to report/log any errors that would affect later processing.

Implements opensaml::saml2md::MetadataProvider.

virtual EntityDescriptor* opensaml::saml2md::DynamicMetadataProvider::resolve ( const Criteria criteria) const
protectedvirtual

Resolves a metadata instance using the supplied criteria.

Parameters
criterialookup criteria
Returns
a valid metadata instance

Member Data Documentation

bool opensaml::saml2md::DynamicMetadataProvider::m_validate
protected

Controls XML schema validation.


The documentation for this class was generated from the following file: