Class GenericPrincipalService<T extends Principal>
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.idp.authn.principal.GenericPrincipalService<T>
- Type Parameters:
T
- type of principal
- All Implemented Interfaces:
PrincipalService<T>
,Component
,DestructableComponent
,IdentifiableComponent
,IdentifiedComponent
,InitializableComponent
public class GenericPrincipalService<T extends Principal>
extends AbstractIdentifiableInitializableComponent
implements PrincipalService<T>
PrincipalService
for most principal types that just exposes the proper PrincipalSerializer
.
Mainly provided in the event that the service API gets more complex.
- Since:
- 4.1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PrincipalSerializer<String>
Generic principal serializer.Type of principal. -
Constructor Summary
ConstructorsConstructorDescriptionGenericPrincipalService
(Class<T> claz, PrincipalSerializer<String> serializer) Constructor. -
Method Summary
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
doInitialize, getId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, 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
-
principalType
Type of principal. -
principalSerializer
Generic principal serializer.
-
-
Constructor Details
-
GenericPrincipalService
public GenericPrincipalService(@Nonnull @ParameterName(name="claz") Class<T> claz, @Nonnull @ParameterName(name="serializer") PrincipalSerializer<String> serializer) Constructor.- Parameters:
claz
- the principal typeserializer
- the principal serializer to use
-
-
Method Details
-
getType
Get the type of object supported.- Specified by:
getType
in interfacePrincipalService<T extends Principal>
- Returns:
- supported type
-
getSerializer
Get a serializer instance for this type ofPrincipal
.- Specified by:
getSerializer
in interfacePrincipalService<T extends Principal>
- Returns:
- the serializer
-