org.opensaml.saml2.metadata.provider
Class ResourceBackedMetadataProvider
java.lang.Object
org.opensaml.saml2.metadata.provider.BaseMetadataProvider
org.opensaml.saml2.metadata.provider.AbstractMetadataProvider
org.opensaml.saml2.metadata.provider.AbstractObservableMetadataProvider
org.opensaml.saml2.metadata.provider.ResourceBackedMetadataProvider
- All Implemented Interfaces:
- MetadataProvider, ObservableMetadataProvider
public class ResourceBackedMetadataProvider
- extends AbstractObservableMetadataProvider
A metadata provider that reads metadata from a {#link Resource
.
- Since:
- 2.2
Constructor Summary |
ResourceBackedMetadataProvider(org.opensaml.util.resource.Resource resource,
java.util.Timer timer,
long maxMetadataCacheDuration)
Constructor. |
Method Summary |
org.opensaml.xml.XMLObject |
getMetadata()
Gets the entire metadata tree, after the registered filter has been applied. |
void |
initialize()
Initializes the provider and prepares it for use. |
boolean |
maintainExpiredMetadata()
Gets whether cached metadata should be discarded if it expires and can not be refreshed. |
void |
setMaintainExpiredMetadata(boolean maintain)
Sets whether cached metadata should be discarded if it expires and can not be refreshed. |
Methods inherited from class org.opensaml.saml2.metadata.provider.AbstractMetadataProvider |
clearDescriptorIndex, filterMetadata, getEntitiesDescriptor, getEntitiesDescriptorByName, getEntityDescriptor, getEntityDescriptorById, getEntityDescriptorById, getParserPool, getRole, getRole, isValid, releaseMetadataDOM, setParserPool, unmarshallMetadata |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResourceBackedMetadataProvider
public ResourceBackedMetadataProvider(org.opensaml.util.resource.Resource resource,
java.util.Timer timer,
long maxMetadataCacheDuration)
throws MetadataProviderException
- Constructor.
- Parameters:
resource
- resource from which to read the metadata file.timer
- task timer used to schedule metadata refresh tasksmaxMetadataCacheDuration
- maximum amount of time, in milliseconds, that metadata may be cached before being
re-read
- Throws:
MetadataProviderException
- thrown if there is a problem retrieving information about the resource
initialize
public void initialize()
throws MetadataProviderException
- Initializes the provider and prepares it for use.
- Throws:
MetadataProviderException
- thrown if there is a problem reading, parsing, or validating the metadata
maintainExpiredMetadata
public boolean maintainExpiredMetadata()
- Gets whether cached metadata should be discarded if it expires and can not be refreshed.
- Returns:
- whether cached metadata should be discarded if it expires and can not be refreshed
setMaintainExpiredMetadata
public void setMaintainExpiredMetadata(boolean maintain)
- Sets whether cached metadata should be discarded if it expires and can not be refreshed.
- Parameters:
maintain
- whether cached metadata should be discarded if it expires and can not be refreshed
getMetadata
public org.opensaml.xml.XMLObject getMetadata()
throws MetadataProviderException
- Gets the entire metadata tree, after the registered filter has been applied.
- Returns:
- the entire metadata tree
- Throws:
MetadataProviderException
- thrown if the provider can not fetch the metadata
Copyright © 2006-2011 Internet2. All Rights Reserved.