Class ChainingClientInformationResolver
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.oidc.metadata.impl.ChainingClientInformationResolver
- All Implemented Interfaces:
ClientInformationResolver,RefreshableClientInformationResolver,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent,Resolver<OIDCClientInformation,CriteriaSet>
public class ChainingClientInformationResolver
extends AbstractIdentifiableInitializableComponent
implements RefreshableClientInformationResolver
A client information provider that uses registered resolvers, in turn, to answer queries.
The Iterable of client informations returned is the first non-null and non-empty Iterable found while iterating over
the registered resolvers in resolver list order.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerClass logger.private List<ClientInformationResolver>Registered resolvers. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intcountClients(ClientInformationResolver resolver) Counts the clients found from the given resolver.protected voidprotected voidGets the time the last refresh cycle occurred.Get the time that the currently available client information was last updated.Get an immutable the list of currently registered resolvers.voidrefresh()Refresh the data exposed by the resolver.resolve(CriteriaSet criteria) resolveSingle(CriteriaSet criteria) voidsetResolvers(List<? extends ClientInformationResolver> newResolvers) Set the registered client information resolvers.Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getId
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
resolvers
Registered resolvers.
-
-
Constructor Details
-
ChainingClientInformationResolver
public ChainingClientInformationResolver()Constructor.
-
-
Method Details
-
getResolvers
@Nonnull @NonnullElements @Unmodifiable @NotLive public List<ClientInformationResolver> getResolvers()Get an immutable the list of currently registered resolvers.- Returns:
- list of currently registered resolvers
-
setResolvers
public void setResolvers(@Nullable @NonnullElements List<? extends ClientInformationResolver> newResolvers) throws ResolverException Set the registered client information resolvers.- Parameters:
newResolvers- the client information resolvers to use- Throws:
ResolverException- thrown if there is a problem adding the client information resolvers
-
refresh
Refresh the data exposed by the resolver.An implementation of this method should typically be either
synchronizedor make use other locking mechanisms to protect against concurrent access.- Specified by:
refreshin interfaceRefreshableClientInformationResolver- Throws:
ResolverException- if the refresh operation was unsuccessful
-
getLastUpdate
Get the time that the currently available client information was last updated. Note, this may be different than the time retrieved byRefreshableClientInformationResolver.getLastRefresh()is the client information was known not to have changed during the last refresh cycle.- Specified by:
getLastUpdatein interfaceRefreshableClientInformationResolver- Returns:
- time when the currently client information was last updated, null if it has never successfully been read in
-
getLastRefresh
Gets the time the last refresh cycle occurred.- Specified by:
getLastRefreshin interfaceRefreshableClientInformationResolver- Returns:
- time the last refresh cycle occurred
-
doInitialize
- Overrides:
doInitializein classAbstractIdentifiedInitializableComponent- Throws:
ComponentInitializationException
-
doDestroy
protected void doDestroy()- Overrides:
doDestroyin classAbstractInitializableComponent
-
countClients
Counts the clients found from the given resolver.- Parameters:
resolver- The resolver whose clients are counted.- Returns:
- The amount of resolvable clients.
-