Class ResourceBackedMetadataResolver

  • All Implemented Interfaces:
    Iterable<org.opensaml.saml.saml2.metadata.EntityDescriptor>, net.shibboleth.utilities.java.support.component.Component, net.shibboleth.utilities.java.support.component.DestructableComponent, net.shibboleth.utilities.java.support.component.IdentifiableComponent, net.shibboleth.utilities.java.support.component.IdentifiedComponent, net.shibboleth.utilities.java.support.component.InitializableComponent, net.shibboleth.utilities.java.support.resolver.Resolver<org.opensaml.saml.saml2.metadata.EntityDescriptor,​net.shibboleth.utilities.java.support.resolver.CriteriaSet>, org.opensaml.saml.metadata.IterableMetadataSource, org.opensaml.saml.metadata.resolver.BatchMetadataResolver, org.opensaml.saml.metadata.resolver.MetadataResolver, org.opensaml.saml.metadata.resolver.RefreshableMetadataResolver

    public class ResourceBackedMetadataResolver
    extends AbstractReloadingMetadataResolver
    A metadata provider that reads metadata from a {#link Resource.
    Since:
    2.2
    • Field Detail

      • log

        private final Logger log
        Class logger.
      • metadataResource

        private net.shibboleth.utilities.java.support.resource.Resource metadataResource
        Resource from which metadata is read.
    • Constructor Detail

      • ResourceBackedMetadataResolver

        public ResourceBackedMetadataResolver​(@ParameterName(name="timer")
                                              Timer timer,
                                              @ParameterName(name="resource")
                                              net.shibboleth.utilities.java.support.resource.Resource resource)
                                       throws IOException
        Constructor.
        Parameters:
        resource - resource from which to read the metadata file.
        timer - task timer used to schedule metadata refresh tasks
        Throws:
        IOException - thrown if there is a problem retrieving information about the resource
      • ResourceBackedMetadataResolver

        public ResourceBackedMetadataResolver​(@ParameterName(name="resource")
                                              net.shibboleth.utilities.java.support.resource.Resource resource)
                                       throws IOException
        Constructor.
        Parameters:
        resource - resource from which to read the metadata file.
        Throws:
        IOException - thrown if there is a problem retrieving information about the resource
    • Method Detail

      • getMetadataIdentifier

        protected String getMetadataIdentifier()
        Gets an identifier which may be used to distinguish this metadata in logging statements.
        Specified by:
        getMetadataIdentifier in class AbstractReloadingMetadataResolver
        Returns:
        identifier which may be used to distinguish this metadata in logging statements
      • fetchMetadata

        protected byte[] fetchMetadata()
                                throws net.shibboleth.utilities.java.support.resolver.ResolverException
        Fetches metadata from a source.
        Specified by:
        fetchMetadata in class AbstractReloadingMetadataResolver
        Returns:
        the fetched metadata, or null if the metadata is known not to have changed since the last retrieval
        Throws:
        net.shibboleth.utilities.java.support.resolver.ResolverException - thrown if there is a problem fetching the metadata