Class MetadataProviderContainer
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
-
- net.shibboleth.ext.spring.service.AbstractServiceableComponent<MetadataResolver>
-
- net.shibboleth.idp.profile.spring.relyingparty.metadata.MetadataProviderContainer
-
- All Implemented Interfaces:
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 ofMetadataResolvers, wrapped into a serviceable component.
-
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.LoggerlogClass logger.private MetadataResolverresolverThe embedded resolver.private IntegersortKeyThe key by which we sort the provider.private static intsortKeyValueIf we autogenerate a sort key it comes from this count.
-
Constructor Summary
Constructors Constructor Description MetadataProviderContainer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(MetadataProviderContainer other)protected voiddoInitialize()booleanequals(Object other).MetadataResolvergetComponent()MetadataResolvergetEmbeddedResolver()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.ext.spring.service.AbstractServiceableComponent
doDestroy, getApplicationContext, pinComponent, setApplicationContext, unloadComponent, unpinComponent
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
getId
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, initialize, isDestroyed, isInitialized
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiedComponent
getId
-
-
-
-
Field Detail
-
sortKeyValue
private static int sortKeyValue
If we autogenerate a sort key it comes from this count.
-
log
private final org.slf4j.Logger log
Class logger.
-
resolver
@NonnullAfterInit private MetadataResolver resolver
The embedded resolver.
-
sortKey
@NonnullAfterInit private Integer sortKey
The key by which we sort the provider.
-
-
Method Detail
-
setSortKey
public void setSortKey(int key)
Set the sort key.- Parameters:
key- what to set
-
setEmbeddedResolver
@Nonnull public void setEmbeddedResolver(@Nonnull MetadataResolver theResolver)Set theMetadataResolverto embed.- Parameters:
theResolver- TheMetadataResolverto embed.
-
getEmbeddedResolver
@Nonnull public MetadataResolver getEmbeddedResolver()
Return what we are build around. Used for testing.- Returns:
- the contained resolver.
-
doInitialize
protected void doInitialize() throws ComponentInitializationException- Overrides:
doInitializein classAbstractServiceableComponent<MetadataResolver>- Throws:
ComponentInitializationException
-
compareTo
public int compareTo(MetadataProviderContainer other)
- Specified by:
compareToin interfaceComparable<MetadataProviderContainer>
-
equals
public boolean equals(Object other)
. We are within a spring context and so equality can be determined by ID, however we also test by sortKey just in case.
-
getComponent
public MetadataResolver getComponent()
- Specified by:
getComponentin interfaceServiceableComponent<MetadataResolver>- Specified by:
getComponentin classAbstractServiceableComponent<MetadataResolver>
-
-