Class GenericPrincipalService<T extends Principal>
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.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.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
doInitialize, ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.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:
getTypein interfacePrincipalService<T extends Principal>- Returns:
- supported type
-
getSerializer
Get a serializer instance for this type ofPrincipal.- Specified by:
getSerializerin interfacePrincipalService<T extends Principal>- Returns:
- the serializer
-