Class PatternServiceRegistry

  • All Implemented Interfaces:
    ServiceRegistry, 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.service.ServiceableComponent<ServiceRegistry>, Aware, ApplicationContextAware

    public class PatternServiceRegistry
    extends net.shibboleth.ext.spring.service.AbstractServiceableComponent<ServiceRegistry>
    implements ServiceRegistry
    Service registry that evaluates a candidate service URL against one or more defined services, where each definition contains a service URL regular expression pattern.

    NOTE: This class will become an implementation component in the next major software version.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ServiceRegistry getComponent()  
      Service lookup​(String serviceURL)
      Looks up a service entry from a service URL.
      void setDefinitions​(List<ServiceDefinition> serviceDefinitions)
      Sets the list of service definitions that back the registry.
      • Methods inherited from class net.shibboleth.ext.spring.service.AbstractServiceableComponent

        doDestroy, doInitialize, 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 interface net.shibboleth.utilities.java.support.component.IdentifiedComponent

        getId
    • Field Detail

      • log

        private final org.slf4j.Logger log
        Class logger.
      • definitions

        @Nonnull
        @NonnullElements
        private Map<ServiceDefinition,​Pattern> definitions
        Map of service definitions to compiled patterns.
    • Constructor Detail

      • PatternServiceRegistry

        public PatternServiceRegistry()
    • Method Detail

      • setDefinitions

        public void setDefinitions​(@Nonnull @NonnullElements
                                   List<ServiceDefinition> serviceDefinitions)
        Sets the list of service definitions that back the registry.
        Parameters:
        serviceDefinitions - List of service definitions, each of which defines a match pattern to evaluate a candidate service URL.
      • getComponent

        @Nonnull
        public ServiceRegistry getComponent()
        Specified by:
        getComponent in interface net.shibboleth.utilities.java.support.service.ServiceableComponent<ServiceRegistry>
        Specified by:
        getComponent in class net.shibboleth.ext.spring.service.AbstractServiceableComponent<ServiceRegistry>
      • lookup

        @Nullable
        public Service lookup​(@Nonnull
                              String serviceURL)
        Description copied from interface: ServiceRegistry
        Looks up a service entry from a service URL.
        Specified by:
        lookup in interface ServiceRegistry
        Parameters:
        serviceURL - Non-null CAS service URL.
        Returns:
        Service found in registry or null if no match found.