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
Fields Modifier and Type Field Description private static String
CREATION_INSTANT_FIELD
Field name of creation instant.private static String
FLOW_ID_ARRAY_FIELD
Field name of flow ID array.private static String
IPV4_ADDRESS_FIELD
Field name of IPv4 address.private static String
IPV6_ADDRESS_FIELD
Field name of IPv6 address.private javax.json.spi.JsonProvider
jsonProvider
JsonProvider to be used for session serialization.private org.slf4j.Logger
log
Class logger.private static String
PRINCIPAL_NAME_FIELD
Field name of principal name.private static String
SERVICE_ID_ARRAY_FIELD
Field name of service ID array.private StorageBackedSessionManager
sessionManager
Back-reference to parent instance.private StorageBackedIdPSession
targetObject
Object instance to overwrite with deserialization method. -
Constructor Summary
Constructors Constructor Description StorageBackedIdPSessionSerializer(StorageBackedSessionManager manager, StorageBackedIdPSession target)
Constructor. -
Method Summary
Modifier and Type Method Description StorageBackedIdPSession
deserialize(long version, String context, String key, String value, Long expiration)
String
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:
- Constant Field Values
-
PRINCIPAL_NAME_FIELD
Field name of principal name.- See Also:
- Constant Field Values
-
IPV4_ADDRESS_FIELD
Field name of IPv4 address.- See Also:
- Constant Field Values
-
IPV6_ADDRESS_FIELD
Field name of IPv6 address.- See Also:
- Constant Field Values
-
FLOW_ID_ARRAY_FIELD
Field name of flow ID array.- See Also:
- Constant Field Values
-
SERVICE_ID_ARRAY_FIELD
Field name of service ID array.- See Also:
- Constant Field Values
-
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
-