public abstract class AbstractDynamicMetadataResolver extends AbstractMetadataResolver implements DynamicMetadataResolver
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractDynamicMetadataResolver.BackingStoreCleanupSweeper
Background maintenance task which cleans idle metadata from the backing store, and removes
orphaned entity management data.
|
protected class |
AbstractDynamicMetadataResolver.DynamicEntityBackingStore
Specialized entity backing store implementation for dynamic metadata resolvers.
|
protected class |
AbstractDynamicMetadataResolver.EntityManagementData
Class holding per-entity management data.
|
AbstractMetadataResolver.EntityBackingStore| Modifier and Type | Field and Description |
|---|---|
private AbstractDynamicMetadataResolver.BackingStoreCleanupSweeper |
cleanupTask
The backing store cleanup sweeper background task.
|
private Long |
cleanupTaskInterval
The interval in milliseconds at which the cleanup task should run.
|
private boolean |
createdOwnTaskTimer
Whether we created our own task timer during object construction.
|
private Logger |
log
Class logger.
|
private Long |
maxIdleEntityData
The maximum idle time in milliseconds for which the resolver will keep data for a given entityID,
before it is removed.
|
private Timer |
taskTimer
Timer used to schedule background metadata update tasks.
|
| Constructor and Description |
|---|
AbstractDynamicMetadataResolver(Timer backgroundTaskTimer)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected AbstractDynamicMetadataResolver.DynamicEntityBackingStore |
createNewBackingStore()
Create a new backing store instance for EntityDescriptor data.
|
protected void |
doDestroy() |
protected abstract Iterable<EntityDescriptor> |
fetchByCriteria(net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria)
Fetch metadata from an origin source based on the input criteria, store it in the backing store
and then return it.
|
protected AbstractDynamicMetadataResolver.DynamicEntityBackingStore |
getBackingStore()
Get the EntityDescriptor backing store currently in use by the metadata resolver.
|
Long |
getCleanupTaskInterval()
Get the interval in milliseconds at which the cleanup task should run.
|
Long |
getMaxIdleEntityData()
Get the maximum idle time in milliseconds for which the resolver will keep data for a given entityID,
before it is removed.
|
protected void |
initMetadataResolver()
Subclasses should override this method to perform any initialization logic necessary.
|
protected List<EntityDescriptor> |
lookupEntityID(String entityID)
Get list of descriptors matching an entityID.
|
protected void |
processNewMetadata(org.opensaml.core.xml.XMLObject root,
String expectedEntityID)
Process the specified new metadata document, including metadata filtering, and store the
processed metadata in the backing store.
|
Iterable<EntityDescriptor> |
resolve(net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria) |
void |
setCleanupTaskInterval(Long interval)
Set the interval in milliseconds at which the cleanup task should run.
|
void |
setMaxIdleEntityData(Long max)
Set the maximum idle time in milliseconds for which the resolver will keep data for a given entityID,
before it is removed.
|
doInitialize, filterMetadata, getMetadataFilter, getParserPool, getUnmarshallerFactory, indexEntityDescriptor, isFailFastInitialization, isRequireValidMetadata, isValid, lookupIndexedEntityID, preProcessEntitiesDescriptor, preProcessEntityDescriptor, releaseMetadataDOM, resolveSingle, setBackingStore, setFailFastInitialization, setMetadataFilter, setParserPool, setRequireValidMetadata, unmarshallMetadatasetIdgetIddestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMetadataFilter, isRequireValidMetadata, setMetadataFilter, setRequireValidMetadataresolveSinglegetIdprivate final Logger log
private Timer taskTimer
private boolean createdOwnTaskTimer
private Long maxIdleEntityData
private Long cleanupTaskInterval
private AbstractDynamicMetadataResolver.BackingStoreCleanupSweeper cleanupTask
@Nonnull public Long getMaxIdleEntityData()
Defaults to: 8 hours.
public void setMaxIdleEntityData(@Nonnull Long max)
Defaults to: 8 hours.
max - the maximum entity data idle time, in milliseconds@Nonnull public Long getCleanupTaskInterval()
Defaults to: 30 minutes.
public void setCleanupTaskInterval(@Nonnull Long interval)
Defaults to: 30 minutes.
interval - the interval to set, in milliseconds@Nonnull public Iterable<EntityDescriptor> resolve(@Nonnull net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria) throws net.shibboleth.utilities.java.support.resolver.ResolverException
resolve in interface net.shibboleth.utilities.java.support.resolver.Resolver<EntityDescriptor,net.shibboleth.utilities.java.support.resolver.CriteriaSet>net.shibboleth.utilities.java.support.resolver.ResolverException@Nonnull @NonnullElements protected abstract Iterable<EntityDescriptor> fetchByCriteria(@Nonnull net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria) throws net.shibboleth.utilities.java.support.resolver.ResolverException
criteria - the input criteria setnet.shibboleth.utilities.java.support.resolver.ResolverException - if there is a fatal error attempting to resolve the metadata@Nonnull @NonnullElements protected List<EntityDescriptor> lookupEntityID(@Nonnull String entityID) throws net.shibboleth.utilities.java.support.resolver.ResolverException
lookupEntityID in class AbstractMetadataResolverentityID - entityID to lookupnet.shibboleth.utilities.java.support.resolver.ResolverException - if an error occurs@Nonnull protected void processNewMetadata(@Nonnull org.opensaml.core.xml.XMLObject root, @Nonnull String expectedEntityID) throws FilterException
In order to be processed successfully, the metadata (after filtering) must be an instance of
EntityDescriptor and its entityID value must match the value supplied
as the required expectedEntityID argument.
root - the root of the new metadata document being processedexpectedEntityID - the expected entityID of the resolved metadataFilterException - if there is a problem filtering the metadata@Nonnull protected AbstractDynamicMetadataResolver.DynamicEntityBackingStore createNewBackingStore()
AbstractMetadataResolver.setBackingStore(EntityBackingStore) to make it the effective
instance in use.createNewBackingStore in class AbstractMetadataResolver@NonnullAfterInit protected AbstractDynamicMetadataResolver.DynamicEntityBackingStore getBackingStore()
getBackingStore in class AbstractMetadataResolverprotected void initMetadataResolver()
throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
initMetadataResolver in class AbstractMetadataResolvernet.shibboleth.utilities.java.support.component.ComponentInitializationException - thrown if there is a problem initializing the providerprotected void doDestroy()
doDestroy in class AbstractMetadataResolverCopyright © 1999–2014. All rights reserved.