opensaml::saml2md::AbstractMetadataProvider Class Reference

Base class for caching metadata providers. More...

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

Inheritance diagram for opensaml::saml2md::AbstractMetadataProvider:

opensaml::saml2md::ObservableMetadataProvider opensaml::saml2md::MetadataProvider opensaml::saml2md::DynamicMetadataProvider List of all members.

Public Member Functions

void outputStatus (std::ostream &os) const
 Generate an XML representation of the provider's status.
void emitChangeEvent () const
 Convenience method for notifying every registered Observer of an event.
void emitChangeEvent (const EntityDescriptor &) const
 Convenience method for notifying every registered Observer of an event.
std::pair< const EntityDescriptor *,
const RoleDescriptor * > 
getEntityDescriptor (const Criteria &criteria) const
const EntitiesDescriptor * getEntitiesDescriptor (const char *name, bool requireValidMetadata=true) const
 Gets the metadata for a given group of entities.
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

Protected Member Functions

 AbstractMetadataProvider (const xercesc::DOMElement *e=nullptr)
 Constructor.
virtual void indexEntity (EntityDescriptor *site, time_t &validUntil, bool replace=false) const
 Loads an entity into the cache for faster lookup.
virtual void indexGroup (EntitiesDescriptor *group, time_t &validUntil) const
 Loads a group of entities into the cache for faster lookup.
virtual void index (EntityDescriptor *site, time_t validUntil, bool replace=false) const
virtual void index (EntitiesDescriptor *group, time_t validUntil) const
virtual void unindex (const XMLCh *entityID, bool freeSites=false) const
 Clear a specific entity from the cache.
virtual void clearDescriptorIndex (bool freeSites=false)
 Clear the cache of known entities and groups.

Protected Attributes

time_t m_lastUpdate
 Time of last update for reporting.
xmltooling::KeyInfoResolver * m_resolver
 Embedded KeyInfoResolver instance.

Detailed Description

Base class for caching metadata providers.


Constructor & Destructor Documentation

opensaml::saml2md::AbstractMetadataProvider::AbstractMetadataProvider const xercesc::DOMElement *  e = nullptr  )  [protected]
 

Constructor.

If a DOM is supplied, a set of default logic will be used to identify and build a KeyInfoResolver plugin and install it into the provider.

The following XML content is supported:

  • <KeyInfoResolver> elements with a type attribute

XML namespaces are ignored in the processing of these elements.

Parameters:
e DOM to supply configuration for provider


Member Function Documentation

virtual void opensaml::saml2md::AbstractMetadataProvider::clearDescriptorIndex bool  freeSites = false  )  [protected, virtual]
 

Clear the cache of known entities and groups.

Parameters:
freeSites true iff the objects cached in the site map should be freed.

const EntitiesDescriptor* opensaml::saml2md::AbstractMetadataProvider::getEntitiesDescriptor const char *  name,
bool  requireValidMetadata = true
const [virtual]
 

Gets the metadata for a given group of entities.

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

Parameters:
name the name of the group
requireValidMetadata indicates whether the metadata for the group must be valid/current
Returns:
the group's metadata or nullptr if there is no metadata or no valid metadata

Implements opensaml::saml2md::MetadataProvider.

virtual void opensaml::saml2md::AbstractMetadataProvider::index EntitiesDescriptor *  group,
time_t  validUntil
const [protected, virtual]
 

Deprecated:
Loads a group of entities into the cache for faster lookup.
Parameters:
group group definition
validUntil maximum expiration time of the group definition

virtual void opensaml::saml2md::AbstractMetadataProvider::index EntityDescriptor *  site,
time_t  validUntil,
bool  replace = false
const [protected, virtual]
 

Deprecated:
Loads an entity into the cache for faster lookup.

This includes processing known reverse lookup strategies for artifacts. This method will *not* free any objects removed from the cache.

Parameters:
site entity definition
validUntil maximum expiration time of the entity definition
replace true iff existing entries for the same entity should be cleared/replaced

virtual void opensaml::saml2md::AbstractMetadataProvider::indexEntity EntityDescriptor *  site,
time_t &  validUntil,
bool  replace = false
const [protected, virtual]
 

Loads an entity into the cache for faster lookup.

This includes processing known reverse lookup strategies for artifacts. The validUntil parameter will contain the smallest value found on output. This method will *not* free any objects removed from the cache.

Parameters:
site entity definition
validUntil maximum expiration time of the entity definition
replace true iff existing entries for the same entity should be cleared/replaced

virtual void opensaml::saml2md::AbstractMetadataProvider::indexGroup EntitiesDescriptor *  group,
time_t &  validUntil
const [protected, virtual]
 

Loads a group of entities into the cache for faster lookup.

The validUntil parameter will contain the smallest value found on output.

Parameters:
group group definition
validUntil maximum expiration time of the group definition

void opensaml::saml2md::AbstractMetadataProvider::outputStatus std::ostream &  os  )  const [virtual]
 

Generate an XML representation of the provider's status.

The XML must be well-formed, but is otherwise arbitrary.

Parameters:
os stream to write status information to

Reimplemented from opensaml::saml2md::MetadataProvider.

virtual void opensaml::saml2md::AbstractMetadataProvider::unindex const XMLCh *  entityID,
bool  freeSites = false
const [protected, virtual]
 

Clear a specific entity from the cache.

Parameters:
entityID the ID of the entity to remove
freeSites true iff the objects cached in the site map should be freed.


The documentation for this class was generated from the following file:
Generated on Thu Sep 14 00:40:39 2017 for opensaml-2.6.0 by  doxygen 1.4.6