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>
PrincipalServicefor most principal types that just exposes the properPrincipalSerializer.Mainly provided in the event that the service API gets more complex.
- Since:
- 4.1.0
-
-
Field Summary
Fields Modifier and Type Field Description private PrincipalSerializer<String>principalSerializerGeneric principal serializer.private Class<T>principalTypeType of principal.
-
Constructor Summary
Constructors Constructor Description GenericPrincipalService(Class<T> claz, PrincipalSerializer<String> serializer)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PrincipalSerializer<String>getSerializer()Get a serializer instance for this type ofPrincipal.Class<T>getType()Get the type of object supported.-
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 Detail
-
principalSerializer
@Nonnull private final PrincipalSerializer<String> principalSerializer
Generic principal serializer.
-
-
Constructor Detail
-
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 Detail
-
getType
@Nonnull public Class<T> getType()
Get the type of object supported.- Specified by:
getTypein interfacePrincipalService<T extends Principal>- Returns:
- supported type
-
getSerializer
@Nonnull public PrincipalSerializer<String> getSerializer()
Get a serializer instance for this type ofPrincipal.- Specified by:
getSerializerin interfacePrincipalService<T extends Principal>- Returns:
- the serializer
-
-