public class SessionStore extends Object
VaadinSession
as if it was a key-value store where
the key would be a UiContextReference
and the value
would be BeanStore
(stores the scoped beans and provides access to them).UiScopes
Constructor and Description |
---|
SessionStore(com.vaadin.server.VaadinSession vaadinSession,
info.magnolia.event.EventBus eventBus) |
Modifier and Type | Method and Description |
---|---|
static SessionStore |
access()
Returns
SessionStore corresponding to current VaadinSession . |
static SessionStore |
access(com.vaadin.server.VaadinSession session)
Returns
SessionStore corresponding to provided VaadinSession . |
BeanStore |
createBeanStore(UiContextReference uiContextReference) |
BeanStore |
createBeanStore(UiContextReference key,
Map<com.google.inject.Key,Object> initialInstances) |
BeanStore |
getBeanStore(UiContextReference uiContextReference)
Finds a bean store which corresponds to a scope key.
|
static <T> Stream<T> |
lookUpInstancesOf(UiContextReference uiContextReference,
Class<T> clazz) |
Optional<UiContextReference> |
lookupRelatedUiContextReference(Object instance) |
void |
releaseBeanStore(UiContextReference uiContextReference)
Clears a bean store which corresponds to a ui context and removes it.
|
public SessionStore(com.vaadin.server.VaadinSession vaadinSession, info.magnolia.event.EventBus eventBus)
public static SessionStore access()
SessionStore
corresponding to current VaadinSession
.public static SessionStore access(com.vaadin.server.VaadinSession session)
SessionStore
corresponding to provided VaadinSession
.public BeanStore createBeanStore(UiContextReference uiContextReference)
public BeanStore createBeanStore(UiContextReference key, Map<com.google.inject.Key,Object> initialInstances)
public BeanStore getBeanStore(UiContextReference uiContextReference)
public Optional<UiContextReference> lookupRelatedUiContextReference(Object instance)
public void releaseBeanStore(UiContextReference uiContextReference)
public static <T> Stream<T> lookUpInstancesOf(UiContextReference uiContextReference, Class<T> clazz)
Copyright © 2020 Magnolia International Ltd.. All rights reserved.