Package net.shibboleth.oidc.metadata
Class RelyingPartyClientInformationProvider
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.shared.spring.service.AbstractServiceableComponent<ClientInformationResolver>
net.shibboleth.oidc.metadata.RelyingPartyClientInformationProvider
- All Implemented Interfaces:
AutoCloseable,Comparable<RelyingPartyClientInformationProvider>,ClientInformationResolver,RefreshableClientInformationResolver,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent,Resolver<OIDCClientInformation,,CriteriaSet> ServiceableComponent<ClientInformationResolver>,Aware,ApplicationContextAware
public class RelyingPartyClientInformationProvider
extends AbstractServiceableComponent<ClientInformationResolver>
implements RefreshableClientInformationResolver, Comparable<RelyingPartyClientInformationProvider>
This class exists primarily to allow the parsing of relying-party.xml to create a serviceable implementation of
ClientInformationResolver. Based on net.shibboleth.idp.saml.metadata.RelyingPartyMetadataProvider.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerClass logger.private ClientInformationResolverThe embedded resolver.private IntegerThe key by which we sort the provider.private static intIf we autogenerate a sort key it comes from this count. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintprotected voidboolean.Return what we are build around.Gets the time the last refresh cycle occurred.Get the time that the currently available client information was last updated.inthashCode()voidrefresh()Refresh the data exposed by the resolver.resolve(CriteriaSet criteria) resolveSingle(CriteriaSet criteria) voidsetEmbeddedResolver(ClientInformationResolver theResolver) Set theClientInformationResolverto embed.voidsetSortKey(int key) Set the sort key.Methods inherited from class net.shibboleth.shared.spring.service.AbstractServiceableComponent
close, doDestroy, getApplicationContext, pinComponent, setApplicationContext, unloadComponent, unpinComponentMethods 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, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getId
-
Field Details
-
sortKeyValue
private static int sortKeyValueIf we autogenerate a sort key it comes from this count. -
log
@Nonnull private final org.slf4j.Logger logClass logger. -
resolver
The embedded resolver. -
sortKey
The key by which we sort the provider.
-
-
Constructor Details
-
RelyingPartyClientInformationProvider
public RelyingPartyClientInformationProvider()Constructor.
-
-
Method Details
-
setSortKey
public void setSortKey(int key) Set the sort key.- Parameters:
key- what to set
-
setEmbeddedResolver
Set theClientInformationResolverto embed.- Parameters:
theResolver- TheClientInformationResolverto embed.
-
getEmbeddedResolver
Return what we are build around. Used for testing.- Returns:
- the parameter we got as a constructor
-
doInitialize
- Overrides:
doInitializein classAbstractServiceableComponent<ClientInformationResolver>- Throws:
ComponentInitializationException
-
getComponent
- Specified by:
getComponentin interfaceServiceableComponent<ClientInformationResolver>- Specified by:
getComponentin classAbstractServiceableComponent<ClientInformationResolver>
-
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
-
getLastRefresh
Gets the time the last refresh cycle occurred.- Specified by:
getLastRefreshin interfaceRefreshableClientInformationResolver- Returns:
- time the last refresh cycle occurred
-
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
-
compareTo
- Specified by:
compareToin interfaceComparable<RelyingPartyClientInformationProvider>
-
equals
. We are within a spring context and so equality can be determined by ID, however we also test by sortKey just in case. -
hashCode
public int hashCode()
-