Package net.shibboleth.idp.cas.service
Class PatternServiceRegistry
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<ServiceRegistry>
net.shibboleth.idp.cas.service.PatternServiceRegistry
- All Implemented Interfaces:
ServiceRegistry
,Component
,DestructableComponent
,IdentifiableComponent
,IdentifiedComponent
,InitializableComponent
,ServiceableComponent<ServiceRegistry>
,Aware
,ApplicationContextAware
public class PatternServiceRegistry
extends 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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Map<ServiceDefinition,
Pattern> Map of service definitions to compiled patterns.private final org.slf4j.Logger
Class logger. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionLooks 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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiedComponent
getId
-
Field Details
-
log
private final org.slf4j.Logger logClass logger. -
definitions
Map of service definitions to compiled patterns.
-
-
Constructor Details
-
PatternServiceRegistry
public PatternServiceRegistry()
-
-
Method Details
-
setDefinitions
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
- Specified by:
getComponent
in interfaceServiceableComponent<ServiceRegistry>
- Specified by:
getComponent
in classAbstractServiceableComponent<ServiceRegistry>
-
lookup
Description copied from interface:ServiceRegistry
Looks up a service entry from a service URL.- Specified by:
lookup
in interfaceServiceRegistry
- Parameters:
serviceURL
- Non-null CAS service URL.- Returns:
- Service found in registry or null if no match found.
-