com.vaadin.spring.internal
Class VaadinSessionScope

java.lang.Object
  extended by com.vaadin.spring.internal.VaadinSessionScope
All Implemented Interfaces:
org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.beans.factory.config.Scope

public class VaadinSessionScope
extends Object
implements org.springframework.beans.factory.config.Scope, org.springframework.beans.factory.config.BeanFactoryPostProcessor

Implementation of Spring's Scope that binds the beans to the current VaadinSession (as opposed to the current Servlet session). Registered by default as the scope " "vaadin-session"".

Author:
Petter Holmström (petter@vaadin.com)
See Also:
VaadinSessionScope

Nested Class Summary
static class VaadinSessionScope.VaadinSessionBeanStoreRetrievalStrategy
          Implementation of BeanStoreRetrievalStrategy that stores the BeanStore in the current VaadinSession.
 
Field Summary
static String VAADIN_SESSION_SCOPE_NAME
           
 
Constructor Summary
VaadinSessionScope()
           
 
Method Summary
 Object get(String s, org.springframework.beans.factory.ObjectFactory<?> objectFactory)
           
static BeanStoreRetrievalStrategy getBeanStoreRetrievalStrategy()
          Returns the VaadinSessionScope.VaadinSessionBeanStoreRetrievalStrategy to use.
 String getConversationId()
           
 void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory configurableListableBeanFactory)
           
 void registerDestructionCallback(String s, Runnable runnable)
           
 Object remove(String s)
           
 Object resolveContextualObject(String s)
           
static void setBeanStoreRetrievalStrategy(BeanStoreRetrievalStrategy beanStoreRetrievalStrategy)
          Sets the VaadinSessionScope.VaadinSessionBeanStoreRetrievalStrategy to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VAADIN_SESSION_SCOPE_NAME

public static final String VAADIN_SESSION_SCOPE_NAME
See Also:
Constant Field Values
Constructor Detail

VaadinSessionScope

public VaadinSessionScope()
Method Detail

setBeanStoreRetrievalStrategy

public static void setBeanStoreRetrievalStrategy(BeanStoreRetrievalStrategy beanStoreRetrievalStrategy)
Sets the VaadinSessionScope.VaadinSessionBeanStoreRetrievalStrategy to use.


getBeanStoreRetrievalStrategy

public static BeanStoreRetrievalStrategy getBeanStoreRetrievalStrategy()
Returns the VaadinSessionScope.VaadinSessionBeanStoreRetrievalStrategy to use. By default, VaadinSessionScope.VaadinSessionBeanStoreRetrievalStrategy is used.


get

public Object get(String s,
                  org.springframework.beans.factory.ObjectFactory<?> objectFactory)
Specified by:
get in interface org.springframework.beans.factory.config.Scope

remove

public Object remove(String s)
Specified by:
remove in interface org.springframework.beans.factory.config.Scope

registerDestructionCallback

public void registerDestructionCallback(String s,
                                        Runnable runnable)
Specified by:
registerDestructionCallback in interface org.springframework.beans.factory.config.Scope

resolveContextualObject

public Object resolveContextualObject(String s)
Specified by:
resolveContextualObject in interface org.springframework.beans.factory.config.Scope

getConversationId

public String getConversationId()
Specified by:
getConversationId in interface org.springframework.beans.factory.config.Scope

postProcessBeanFactory

public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory configurableListableBeanFactory)
                            throws org.springframework.beans.BeansException
Specified by:
postProcessBeanFactory in interface org.springframework.beans.factory.config.BeanFactoryPostProcessor
Throws:
org.springframework.beans.BeansException


Copyright © 2016 Vaadin Ltd. All Rights Reserved.