Class ResourceBackedMetadataResolver
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
-
- org.opensaml.saml.metadata.resolver.impl.AbstractMetadataResolver
-
- org.opensaml.saml.metadata.resolver.impl.AbstractBatchMetadataResolver
-
- org.opensaml.saml.metadata.resolver.impl.AbstractReloadingMetadataResolver
-
- org.opensaml.saml.metadata.resolver.impl.ResourceBackedMetadataResolver
-
- All Implemented Interfaces:
Iterable<EntityDescriptor>,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent,Resolver<EntityDescriptor,CriteriaSet>,IterableMetadataSource,BatchMetadataResolver,MetadataResolver,RefreshableMetadataResolver
public class ResourceBackedMetadataResolver extends AbstractReloadingMetadataResolver
A metadata provider that reads metadata from a {#linkResource.- Since:
- 2.2
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opensaml.saml.metadata.resolver.impl.AbstractBatchMetadataResolver
AbstractBatchMetadataResolver.BatchEntityBackingStore
-
Nested classes/interfaces inherited from class org.opensaml.saml.metadata.resolver.impl.AbstractMetadataResolver
AbstractMetadataResolver.EntityBackingStore
-
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.LoggerlogClass logger.private ResourcemetadataResourceResource from which metadata is read.
-
Constructor Summary
Constructors Constructor Description ResourceBackedMetadataResolver(Timer timer, Resource resource)Constructor.ResourceBackedMetadataResolver(Resource resource)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoDestroy()protected byte[]fetchMetadata()Fetches metadata from a source.protected StringgetMetadataIdentifier()Gets an identifier which may be used to distinguish this metadata in logging statements.-
Methods inherited from class org.opensaml.saml.metadata.resolver.impl.AbstractReloadingMetadataResolver
computeNextRefreshDelay, getExpirationTime, getExpirationWarningThreshold, getLastFailureCause, getLastRefresh, getLastSuccessfulRefresh, getLastUpdate, getMaxRefreshDelay, getMinRefreshDelay, getNextRefresh, getRefreshDelayFactor, initMetadataResolver, inputstreamToByteArray, postProcessMetadata, processCachedMetadata, processNewMetadata, processNonExpiredMetadata, processPreExpiredMetadata, refresh, setCacheSourceMetadata, setExpirationWarningThreshold, setMaxRefreshDelay, setMinRefreshDelay, setRefreshDelayFactor, unmarshallMetadata, wasLastRefreshSuccess
-
Methods inherited from class org.opensaml.saml.metadata.resolver.impl.AbstractBatchMetadataResolver
createNewBackingStore, getBackingStore, getCachedFilteredMetadata, getCachedOriginalMetadata, getIndexes, getRootValidUntil, indexEntityDescriptor, isCacheSourceMetadata, isResolveViaPredicatesOnly, isRootValid, iterator, lookupByIndexes, preProcessNewMetadata, resolve, setIndexes, setResolveViaPredicatesOnly
-
Methods inherited from class org.opensaml.saml.metadata.resolver.impl.AbstractMetadataResolver
doInitialize, filterMetadata, getCriterionPredicateRegistry, getLogPrefix, getMetadataFilter, getParserPool, getUnmarshallerFactory, isFailFastInitialization, isRequireValidMetadata, isSatisfyAnyPredicates, isUseDefaultPredicateRegistry, isValid, lookupEntityID, lookupIndexedEntityID, newFilterContext, predicateFilterCandidates, preProcessEntitiesDescriptor, preProcessEntityDescriptor, releaseMetadataDOM, removeByEntityID, resolveSingle, setBackingStore, setCriterionPredicateRegistry, setFailFastInitialization, setMetadataFilter, setParserPool, setRequireValidMetadata, setSatisfyAnyPredicates, setUseDefaultPredicateRegistry, unmarshallMetadata
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
getId
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, initialize, isDestroyed, isInitialized
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiedComponent
getId
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface org.opensaml.saml.metadata.resolver.MetadataResolver
getMetadataFilter, isRequireValidMetadata, setMetadataFilter, setRequireValidMetadata
-
Methods inherited from interface net.shibboleth.utilities.java.support.resolver.Resolver
resolve, resolveSingle
-
-
-
-
Field Detail
-
log
private final org.slf4j.Logger log
Class logger.
-
metadataResource
private Resource metadataResource
Resource from which metadata is read.
-
-
Constructor Detail
-
ResourceBackedMetadataResolver
public ResourceBackedMetadataResolver(@ParameterName(name="timer") Timer timer, @ParameterName(name="resource") Resource resource) throws IOException
Constructor.- Parameters:
resource- resource from which to read the metadata file.timer- task timer used to schedule metadata refresh tasks- Throws:
IOException- thrown if there is a problem retrieving information about the resource
-
ResourceBackedMetadataResolver
public ResourceBackedMetadataResolver(@ParameterName(name="resource") Resource resource) throws IOException
Constructor.- Parameters:
resource- resource from which to read the metadata file.- Throws:
IOException- thrown if there is a problem retrieving information about the resource
-
-
Method Detail
-
doDestroy
protected void doDestroy()
- Overrides:
doDestroyin classAbstractReloadingMetadataResolver
-
getMetadataIdentifier
protected String getMetadataIdentifier()
Gets an identifier which may be used to distinguish this metadata in logging statements.- Specified by:
getMetadataIdentifierin classAbstractReloadingMetadataResolver- Returns:
- identifier which may be used to distinguish this metadata in logging statements
-
fetchMetadata
protected byte[] fetchMetadata() throws ResolverExceptionFetches metadata from a source.- Specified by:
fetchMetadatain classAbstractReloadingMetadataResolver- Returns:
- the fetched metadata, or null if the metadata is known not to have changed since the last retrieval
- Throws:
ResolverException- thrown if there is a problem fetching the metadata
-
-