public class VaadinSessionScope extends Object implements com.holonplatform.core.ContextScope
ContextScope bound to current VaadinSession, looking up context resources using Vaadin Session
attributes.
THis scope uses VaadinSession.getCurrent() to obtain the current Vaadin session, so this scope is active only
when invoked within a Vaadin server request thread.
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME
Context name
|
static int |
ORDER
Context order
|
| Constructor and Description |
|---|
VaadinSessionScope() |
| Modifier and Type | Method and Description |
|---|---|
<T> Optional<T> |
get(String resourceKey,
Class<T> resourceType) |
String |
getName() |
int |
getOrder() |
<T> Optional<T> |
put(String resourceKey,
T value) |
<T> Optional<T> |
putIfAbsent(String resourceKey,
T value) |
boolean |
remove(String resourceKey) |
public static final String NAME
public static final int ORDER
public String getName()
getName in interface com.holonplatform.core.ContextScopepublic int getOrder()
getOrder in interface com.holonplatform.core.ContextScopepublic <T> Optional<T> get(String resourceKey, Class<T> resourceType) throws com.holonplatform.core.exceptions.TypeMismatchException
get in interface com.holonplatform.core.ContextScopecom.holonplatform.core.exceptions.TypeMismatchExceptionpublic <T> Optional<T> put(String resourceKey, T value) throws UnsupportedOperationException
put in interface com.holonplatform.core.ContextScopeUnsupportedOperationExceptionpublic <T> Optional<T> putIfAbsent(String resourceKey, T value) throws UnsupportedOperationException
putIfAbsent in interface com.holonplatform.core.ContextScopeUnsupportedOperationExceptionpublic boolean remove(String resourceKey) throws UnsupportedOperationException
remove in interface com.holonplatform.core.ContextScopeUnsupportedOperationExceptionCopyright © 2019 The Holon Platform. All rights reserved.