Class PrincipalServiceManager
java.lang.Object
net.shibboleth.idp.authn.principal.PrincipalServiceManager
Manages and exposes instances of the
PrincipalService
interface.- Since:
- 4.1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<Class<?>,
PrincipalService<?>> Service index by class.private final Map<String,
PrincipalService<?>> Service index by ID.private final org.slf4j.Logger
Class logger. -
Constructor Summary
ConstructorsConstructorDescriptionPrincipalServiceManager
(Collection<PrincipalService<?>> services) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionall()
Get all of the registered services.<T extends Principal>
PrincipalService<T>Get aPrincipalService
by type.Manufacture aPrincipal
from a string of the format "type/value" where type matches the ID of aPrincipalService
and the value is supplied to a single-arg String constructor if one exists.
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
classIndexedMap
Service index by class. -
idIndexedMap
Service index by ID.
-
-
Constructor Details
-
PrincipalServiceManager
@Autowired public PrincipalServiceManager(@Nullable @NonnullElements @ParameterName(name="services") Collection<PrincipalService<?>> services) Constructor.- Parameters:
services
- instances to manage
-
-
Method Details
-
all
Get all of the registered services.- Returns:
- all registered services
-
byClass
Get aPrincipalService
by type.- Type Parameters:
T
- class type- Parameters:
claz
- class type- Returns:
- service for the type, or null
-
principalFromString
Manufacture aPrincipal
from a string of the format "type/value" where type matches the ID of aPrincipalService
and the value is supplied to a single-arg String constructor if one exists.- Parameters:
s
- the delimited form above- Returns:
- the new object or null
-