#include <saml/saml2/metadata/AbstractDynamicMetadataProvider.h>
Public Member Functions | |
AbstractDynamicMetadataProvider (bool defaultNegativeCache, const xercesc::DOMElement *e=0, bool deprecationSupport=true) | |
Constructor. | |
xmltooling::Lockable * | lock () |
void | unlock () |
const char * | getId () const |
Returns an identifier for the provider for logging/status purposes. | |
const xmltooling::XMLObject * | getMetadata () const |
Gets the entire metadata tree, after the registered filter has been applied. | |
std::pair< const EntityDescriptor *, const RoleDescriptor * > | getEntityDescriptor (const Criteria &criteria) const |
Gets entity metadata based on supplied criteria. | |
Protected Member Functions | |
virtual EntityDescriptor * | resolve (const Criteria &criteria, std::string &cacheTag) const =0 |
Resolves a metadata instance using the supplied criteria. | |
virtual time_t | cacheEntity (EntityDescriptor *entity, const std::string &cacheTag, bool locked=false) const |
Index an entity and cache the fact of it being indexed. | |
time_t | computeNextRefresh (const EntityDescriptor &entity, time_t currentTime) const |
Compute the number of seconds until the next refresh attempt. | |
EntityDescriptor * | entityFromStream (std::istream &stream) const |
Parse and unmarshal the provided stream, returning the EntityDescriptor if there is one. | |
Protected Attributes | |
bool | m_validate |
Controls XML schema validation. |
opensaml::saml2md::AbstractDynamicMetadataProvider::AbstractDynamicMetadataProvider | ( | bool | defaultNegativeCache, | |
const xercesc::DOMElement * | e = 0 , |
|||
bool | deprecationSupport = true | |||
) |
Constructor.
defaultNegativeCache | - if not specified in the element, do we cache lookup failures? | |
e | DOM to supply configuration for provider | |
deprecationSupport | true iff deprecated features and settings should be supported |
const char* opensaml::saml2md::AbstractDynamicMetadataProvider::getId | ( | ) | const [virtual] |
Returns an identifier for the provider for logging/status purposes.
Reimplemented from opensaml::saml2md::MetadataProvider.
const xmltooling::XMLObject* opensaml::saml2md::AbstractDynamicMetadataProvider::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.
Implements opensaml::saml2md::MetadataProvider.
std::pair<const EntityDescriptor*,const RoleDescriptor*> opensaml::saml2md::AbstractDynamicMetadataProvider::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.
criteria | lookup criteria |
Reimplemented from opensaml::saml2md::AbstractMetadataProvider.
virtual EntityDescriptor* opensaml::saml2md::AbstractDynamicMetadataProvider::resolve | ( | const Criteria & | criteria, | |
std::string & | cacheTag | |||
) | const [protected, pure virtual] |
Resolves a metadata instance using the supplied criteria.
A null return value indicates the instance hasn't changed since the prevous request for the same instance.
The cache tag may be modified on output to update it for future calls.
criteria | lookup criteria | |
cacheTag | implementation specific cache tag |
an | exception if resolution failed |
virtual time_t opensaml::saml2md::AbstractDynamicMetadataProvider::cacheEntity | ( | EntityDescriptor * | entity, | |
const std::string & | cacheTag, | |||
bool | locked = false | |||
) | const [protected, virtual] |
Index an entity and cache the fact of it being indexed.
entity | what to cache | |
cacheTag | cache tag | |
locked | have we locked ourselves exclusively first? |
time_t opensaml::saml2md::AbstractDynamicMetadataProvider::computeNextRefresh | ( | const EntityDescriptor & | entity, | |
time_t | currentTime | |||
) | const [protected] |
Compute the number of seconds until the next refresh attempt.
entity | entity to evaluate | |
currentTime | baseline for calculation |
EntityDescriptor* opensaml::saml2md::AbstractDynamicMetadataProvider::entityFromStream | ( | std::istream & | stream | ) | const [protected] |
Parse and unmarshal the provided stream, returning the EntityDescriptor if there is one.
stream | the stream to parse |
bool opensaml::saml2md::AbstractDynamicMetadataProvider::m_validate [protected] |
Controls XML schema validation.