Package net.shibboleth.idp.session.impl
Class StorageBackedIdPSessionSerializer
java.lang.Object
net.shibboleth.shared.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 StringField name of creation instant.private static final StringField name of flow ID array.private static final StringField name of IPv4 address.private static final StringField name of IPv6 address.private final JsonProviderJsonProvider to be used for session serialization.private final org.slf4j.LoggerClass logger.private static final StringField name of principal name.private static final StringField name of service ID array.private final StorageBackedSessionManagerBack-reference to parent instance.private final StorageBackedIdPSessionObject instance to overwrite with deserialization method.private static final StringField 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.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
-
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
JsonProvider 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:
serializein 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:
deserializein interfaceStorageSerializer<StorageBackedIdPSession>- Throws:
IOException
-