Package | Description |
---|---|
ratpack.session |
Objects for providing
Session support |
Modifier and Type | Interface and Description |
---|---|
interface |
JavaSessionSerializer
Marker interface for serializers that can serialize anything that is
Serializable . |
Modifier and Type | Method and Description |
---|---|
SessionSerializer |
Session.getDefaultSerializer()
The serializer that is used when a serializer is not explicitly given.
|
default SessionSerializer |
SessionData.getDefaultSerializer()
|
Modifier and Type | Method and Description |
---|---|
default <T> Optional<T> |
SessionData.get(Class<T> type,
SessionSerializer serializer)
Read the object with the given type, and no name.
|
<T> Optional<T> |
SessionData.get(SessionKey<T> key,
SessionSerializer serializer)
Read the object with the given key.
|
default Optional<?> |
SessionData.get(String name,
SessionSerializer serializer)
Read the object with the given name.
|
default <T> T |
SessionData.require(Class<T> type,
SessionSerializer serializer)
Like
SessionData.get(Class, SessionSerializer) , but throws NoSuchElementException on the absence of a value. |
default <T> T |
SessionData.require(SessionKey<T> key,
SessionSerializer serializer)
Like
SessionData.get(SessionKey, SessionSerializer) , but throws NoSuchElementException on the absence of a value. |
default Object |
SessionData.require(String name,
SessionSerializer serializer)
Like
SessionData.get(String, SessionSerializer) , but throws NoSuchElementException on the absence of a value. |
default <T> void |
SessionData.set(Class<T> type,
T value,
SessionSerializer serializer)
Sets the value for the given type.
|
<T> void |
SessionData.set(SessionKey<T> key,
T value,
SessionSerializer serializer)
Sets the value for the given key.
|
default <T> void |
SessionData.set(String name,
T value,
SessionSerializer serializer)
Sets the value for the given name and type, using the runtime type of the value.
|
default <T> void |
SessionData.set(T value,
SessionSerializer serializer)
Sets the value for the type, using the runtime type of the value.
|