public class ChainingMetadataResolver extends net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent implements MetadataResolver, RefreshableMetadataResolver
Constructor and Description |
---|
ChainingMetadataResolver()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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(net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria) |
EntityDescriptor |
resolveSingle(net.shibboleth.utilities.java.support.resolver.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.
|
setId
getId
destroy, initialize, isDestroyed, isInitialized
@Nonnull @NonnullElements @Unmodifiable @NotLive public List<MetadataResolver> getResolvers()
public void setResolvers(@Nonnull @NonnullElements List<? extends MetadataResolver> newResolvers) throws net.shibboleth.utilities.java.support.resolver.ResolverException
newResolvers
- the metadata resolvers to usenet.shibboleth.utilities.java.support.resolver.ResolverException
- 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 MetadataResolver
public void setRequireValidMetadata(boolean requireValidMetadata)
setRequireValidMetadata
in interface MetadataResolver
requireValidMetadata
- whether the metadata returned by queries must be validpublic MetadataFilter getMetadataFilter()
getMetadataFilter
in interface MetadataResolver
public void setMetadataFilter(MetadataFilter newFilter)
setMetadataFilter
in interface MetadataResolver
newFilter
- the metadata filter applied to the metadata@Nullable public EntityDescriptor resolveSingle(@Nullable net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria) throws net.shibboleth.utilities.java.support.resolver.ResolverException
resolveSingle
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 public Iterable<EntityDescriptor> resolve(@Nullable 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
public void refresh() throws net.shibboleth.utilities.java.support.resolver.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 RefreshableMetadataResolver
net.shibboleth.utilities.java.support.resolver.ResolverException
- 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 RefreshableMetadataResolver
protected void doInitialize() throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
doInitialize
in class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
net.shibboleth.utilities.java.support.component.ComponentInitializationException
protected void doDestroy()
doDestroy
in class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
Copyright © 2018. All rights reserved.