public class ChainingMetadataResolver extends AbstractIdentifiableInitializableComponent implements MetadataResolver, RefreshableMetadataResolver, ClearableMetadataResolver
| Modifier and Type | Field and Description |
|---|---|
private org.slf4j.Logger |
log
Class logger.
|
private List<MetadataResolver> |
resolvers
Registered resolvers.
|
| Constructor and Description |
|---|
ChainingMetadataResolver()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Attempt to clear all data from the internal cache of the resolver.
|
void |
clear(String entityID)
Attempt to clear data from the internal cache of the resolver for the specified entityID.
|
protected void |
doDestroy() |
protected void |
doInitialize() |
org.joda.time.DateTime |
getLastRefresh()
Gets the time the last refresh cycle occurred.
|
org.joda.time.DateTime |
getLastUpdate()
Get the time that the currently available metadata was last updated.
|
MetadataFilter |
getMetadataFilter()
Gets the metadata filter applied to the metadata.
|
List<MetadataResolver> |
getResolvers()
Get an immutable the list of currently registered resolvers.
|
boolean |
isRequireValidMetadata()
Gets whether the metadata returned by queries must be valid.
|
void |
refresh()
Refresh the data exposed by the resolver.
|
Iterable<EntityDescriptor> |
resolve(CriteriaSet criteria) |
EntityDescriptor |
resolveSingle(CriteriaSet criteria) |
void |
setMetadataFilter(MetadataFilter newFilter)
Sets the metadata filter applied to the metadata.
|
void |
setRequireValidMetadata(boolean requireValidMetadata)
Sets whether the metadata returned by queries must be valid.
|
void |
setResolvers(List<? extends MetadataResolver> newResolvers)
Set the registered metadata resolvers.
|
setIdgetIddestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetId@Nonnull private final org.slf4j.Logger log
@Nonnull @NonnullElements private List<MetadataResolver> resolvers
@Nonnull @NonnullElements @Unmodifiable @NotLive public List<MetadataResolver> getResolvers()
public void setResolvers(@Nonnull@NonnullElements List<? extends MetadataResolver> newResolvers) throws ResolverException
newResolvers - the metadata resolvers to useResolverException - thrown if there is a problem adding the metadata resolverspublic boolean isRequireValidMetadata()
At a minimum, metadata is valid only if the date expressed in the validUntil attribute
of the element and all its ancestral elements has not passed. Specific implementations may add additional
constraints.
isRequireValidMetadata in interface MetadataResolverpublic void setRequireValidMetadata(boolean requireValidMetadata)
setRequireValidMetadata in interface MetadataResolverrequireValidMetadata - whether the metadata returned by queries must be validpublic MetadataFilter getMetadataFilter()
getMetadataFilter in interface MetadataResolverpublic void setMetadataFilter(MetadataFilter newFilter)
setMetadataFilter in interface MetadataResolvernewFilter - the metadata filter applied to the metadata@Nullable public EntityDescriptor resolveSingle(@Nullable CriteriaSet criteria) throws ResolverException
resolveSingle in interface Resolver<EntityDescriptor,CriteriaSet>ResolverException@Nonnull public Iterable<EntityDescriptor> resolve(@Nullable CriteriaSet criteria) throws ResolverException
resolve in interface Resolver<EntityDescriptor,CriteriaSet>ResolverExceptionpublic void clear()
throws ResolverException
clear in interface ClearableMetadataResolverResolverException - if the clear operation was unsuccessfulpublic void clear(String entityID) throws ResolverException
clear in interface ClearableMetadataResolverentityID - the target entityIDResolverException - if the clear operation was unsuccessfulpublic void refresh()
throws ResolverException
An implementation of this method should typically be either synchronized
or make use other locking mechanisms to protect against concurrent access.
refresh in interface RefreshableMetadataResolverResolverException - if the refresh operation was unsuccessful@Nullable public org.joda.time.DateTime getLastUpdate()
RefreshableMetadataResolver.getLastRefresh() is the metadata was known not to have changed during the last refresh
cycle.getLastUpdate in interface RefreshableMetadataResolver@Nullable public org.joda.time.DateTime getLastRefresh()
getLastRefresh in interface RefreshableMetadataResolverprotected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractIdentifiedInitializableComponentComponentInitializationExceptionprotected void doDestroy()
doDestroy in class AbstractInitializableComponentCopyright © 1999–2019 Shibboleth Consortium. All rights reserved.