public class AbstractSession extends Object implements Closeable
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Object> |
sessionObjects |
| Constructor and Description |
|---|
AbstractSession() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
<T> T |
get(Class<T> objectClass) |
Object |
get(String arg0) |
<T,U> T |
getOrDefault(String key,
Function<U,T> def,
U param)
Get a value from the sessionObject.
|
<T> T |
getOrDefault(String key,
T def)
Get a value from the sessionObject.
|
void |
put(Object object) |
Object |
put(String arg0,
Object arg1) |
public <T> T getOrDefault(String key, T def)
T - The type of the return value.key - The key to search in the sessionObjects Map.def - The default value to use if the value does not exist.public <T,U> T getOrDefault(String key, Function<U,T> def, U param)
T - The type of the return value.U - The type of the parameter for the default function.key - The key to search in the sessionObjects Map.def - The function to apply for the default value.param - The parameter for the default function.public <T> T get(Class<T> objectClass)
public void put(Object object)
public void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2020. All rights reserved.