Class MetadataProviderContainer
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.shared.spring.service.AbstractServiceableComponent<MetadataResolver>
net.shibboleth.idp.saml.metadata.impl.MetadataProviderContainer
- All Implemented Interfaces:
AutoCloseable,Comparable<MetadataProviderContainer>,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent,ServiceableComponent<MetadataResolver>,Aware,ApplicationContextAware
public class MetadataProviderContainer
extends AbstractServiceableComponent<MetadataResolver>
implements Comparable<MetadataProviderContainer>
This class is a sortable container for
MetadataResolvers, wrapped into a serviceable component.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerClass logger.private MetadataResolverThe 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.inthashCode()voidsetEmbeddedResolver(MetadataResolver theResolver) Set theMetadataResolverto 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
-
MetadataProviderContainer
public MetadataProviderContainer()
-
-
Method Details
-
setSortKey
public void setSortKey(int key) Set the sort key.- Parameters:
key- what to set
-
setEmbeddedResolver
Set theMetadataResolverto embed.- Parameters:
theResolver- TheMetadataResolverto embed.
-
getEmbeddedResolver
Return what we are build around. Used for testing.- Returns:
- the contained resolver.
-
doInitialize
- Overrides:
doInitializein classAbstractServiceableComponent<MetadataResolver>- Throws:
ComponentInitializationException
-
compareTo
- Specified by:
compareToin interfaceComparable<MetadataProviderContainer>
-
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() -
getComponent
- Specified by:
getComponentin interfaceServiceableComponent<MetadataResolver>- Specified by:
getComponentin classAbstractServiceableComponent<MetadataResolver>
-