public class CompositeMetadataResolver extends net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent implements MetadataResolver, RefreshableMetadataResolver
MetadataResolver
implementation that answers requests by composing the answers of child
MetadataResolver
s.Constructor and Description |
---|
CompositeMetadataResolver()
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()
Gets 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<MetadataResolver> newResolvers)
Sets the current set of metadata resolvers.
|
getId, setId
destroy, initialize, isDestroyed, isInitialized
@Nonnull @NonnullElements @Unmodifiable @NotLive public List<MetadataResolver> getResolvers()
public void setResolvers(@Nonnull @NonnullElements List<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 providerpublic 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 valid@Nullable public MetadataFilter getMetadataFilter()
getMetadataFilter
in interface MetadataResolver
public void setMetadataFilter(@Nullable MetadataFilter newFilter)
setMetadataFilter
in interface MetadataResolver
newFilter
- the metadata filter applied to the metadatapublic 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 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
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
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
Copyright © 2017. All rights reserved.