Class CollectionSerializer
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.idp.consent.storage.impl.CollectionSerializer
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,StorageSerializer<Collection<String>>
public class CollectionSerializer
extends AbstractInitializableComponent
implements StorageSerializer<Collection<String>>
Serializes a
Collection of strings. Null elements and non-string values are ignored.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final JsonGeneratorFactoryJSON generator factory.private final org.slf4j.LoggerClass logger.private final JsonReaderFactoryJSON reader factory. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(long version, String context, String key, String value, Long expiration) serialize(Collection<String> instance) Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, 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.InitializableComponent
initialize, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
generatorFactory
JSON generator factory. -
readerFactory
JSON reader factory.
-
-
Constructor Details
-
CollectionSerializer
public CollectionSerializer()Constructor.
-
-
Method Details
-
serialize
- Specified by:
serializein interfaceStorageSerializer<Collection<String>>- Throws:
IOException
-
deserialize
@Nonnull public Collection<String> deserialize(long version, @Nonnull @NotEmpty String context, @Nonnull @NotEmpty String key, @Nonnull @NotEmpty String value, @Nullable Long expiration) throws IOException - Specified by:
deserializein interfaceStorageSerializer<Collection<String>>- Throws:
IOException
-