public interface SessionDataService
Modifier and Type | Method and Description |
---|---|
<Type> Type |
get(SessionDataKey key,
Class<Type> clazz)
Gets the data identified by the given key.
|
SessionDataKey |
put(Object value)
Stores the given object at the session.
|
SessionDataKey |
registerClosable(AutoCloseable value)
Stores the given
closeable object under the given key. |
void |
remove(SessionDataKey key)
Removes the data stored with the given key from the session.
|
<Type> Type get(SessionDataKey key, Class<Type> clazz)
Type
- the class of the data. Inferred from clazz.key
- the key associated to the data. Must not be null.clazz
- the class of the data. Must not be null.SessionDataKey put(Object value)
value
- the object to store. Must not be null.SessionDataKey registerClosable(AutoCloseable value)
closeable object
under the given key. Also registers the value for closing
when the session is closed. Returns the key to retrieve the object.value
- the object to store. Must not be null.void remove(SessionDataKey key) throws IOException, Exception
key
- the key associated to the data. Must not be null.IOException
Exception
Copyright © 2016 SAPERION AG. All rights reserved.