Package net.shibboleth.idp.session.impl
Class StorageBackedIdPSessionSerializer
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.idp.session.impl.StorageBackedIdPSessionSerializer
- All Implemented Interfaces:
Component
,DestructableComponent
,InitializableComponent
,StorageSerializer<StorageBackedIdPSession>
@ThreadSafe
public class StorageBackedIdPSessionSerializer
extends AbstractInitializableComponent
implements StorageSerializer<StorageBackedIdPSession>
A serializer for instances of
StorageBackedIdPSession
designed in conjunction with the
StorageService
-backed SessionManager
implementation.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
Field name of creation instant.private static final String
Field name of flow ID array.private static final String
Field name of IPv4 address.private static final String
Field name of IPv6 address.private final javax.json.spi.JsonProvider
JsonProvider to be used for session serialization.private final org.slf4j.Logger
Class logger.private static final String
Field name of principal name.private static final String
Field name of service ID array.private final StorageBackedSessionManager
Back-reference to parent instance.private final StorageBackedIdPSession
Object instance to overwrite with deserialization method.private static final String
Field name of Unknown address. -
Constructor Summary
ConstructorsConstructorDescriptionStorageBackedIdPSessionSerializer
(StorageBackedSessionManager manager, StorageBackedIdPSession target) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(long version, String context, String key, String value, Long expiration) serialize
(StorageBackedIdPSession instance) Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, doInitialize, 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.InitializableComponent
initialize, isInitialized
-
Field Details
-
CREATION_INSTANT_FIELD
Field name of creation instant.- See Also:
-
PRINCIPAL_NAME_FIELD
Field name of principal name.- See Also:
-
IPV4_ADDRESS_FIELD
Field name of IPv4 address.- See Also:
-
IPV6_ADDRESS_FIELD
Field name of IPv6 address.- See Also:
-
UNK_ADDRESS_FIELD
Field name of Unknown address.- See Also:
-
FLOW_ID_ARRAY_FIELD
Field name of flow ID array.- See Also:
-
SERVICE_ID_ARRAY_FIELD
Field name of service ID array.- See Also:
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
sessionManager
Back-reference to parent instance. -
targetObject
Object instance to overwrite with deserialization method. -
jsonProvider
@Nonnull private final javax.json.spi.JsonProvider jsonProviderJsonProvider to be used for session serialization.
-
-
Constructor Details
-
StorageBackedIdPSessionSerializer
public StorageBackedIdPSessionSerializer(@Nonnull StorageBackedSessionManager manager, @Nullable StorageBackedIdPSession target) Constructor.- Parameters:
manager
- parent SessionManager instancetarget
- object to overwrite when deserializing instead of creating a new instance
-
-
Method Details
-
serialize
@Nonnull @NotEmpty public String serialize(@Nonnull StorageBackedIdPSession instance) throws IOException - Specified by:
serialize
in interfaceStorageSerializer<StorageBackedIdPSession>
- Throws:
IOException
-
deserialize
@Nonnull public StorageBackedIdPSession deserialize(long version, @Nonnull @NotEmpty String context, @Nonnull @NotEmpty String key, @Nonnull @NotEmpty String value, @Nullable Long expiration) throws IOException - Specified by:
deserialize
in interfaceStorageSerializer<StorageBackedIdPSession>
- Throws:
IOException
-