Package net.shibboleth.idp.session
Class SPSessionSerializerRegistry
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- net.shibboleth.idp.session.SPSessionSerializerRegistry
-
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent
public final class SPSessionSerializerRegistry extends AbstractInitializableComponent
A registry of mappings between aSPSessionclass and a correspondingStorageSerializerfor that type.
-
-
Constructor Summary
Constructors Constructor Description SPSessionSerializerRegistry()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends SPSession>
StorageSerializer<T>lookup(Class<T> type)Get a registeredStorageSerializerfor a givenSPSessiontype, if any.voidsetMappings(Map<Class<? extends SPSession>,StorageSerializer<? extends SPSession>> map)Set the mappings to use.-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized
-
-
-
-
Field Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
registry
@Nonnull @NonnullElements private Map<Class<? extends SPSession>,StorageSerializer<? extends SPSession>> registry
Storage for the registry mappings.
-
-
Method Detail
-
setMappings
public void setMappings(@Nonnull @NonnullElements Map<Class<? extends SPSession>,StorageSerializer<? extends SPSession>> map)
Set the mappings to use.- Parameters:
map- map to populate registry with
-
lookup
@Nullable public <T extends SPSession> StorageSerializer<T> lookup(@Nonnull Class<T> type)
Get a registeredStorageSerializerfor a givenSPSessiontype, if any.- Type Parameters:
T- type of SPSession- Parameters:
type- a type of SPSession- Returns:
- a corresponding StorageSerializer, or null
-
-