Class VaadinSessionScope

java.lang.Object
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:
  • Field Details

  • Constructor Details

    • VaadinSessionScope

      public VaadinSessionScope()
  • Method Details

    • setBeanStoreRetrievalStrategy

      public static void setBeanStoreRetrievalStrategy(BeanStoreRetrievalStrategy beanStoreRetrievalStrategy)
    • getBeanStoreRetrievalStrategy

      public static BeanStoreRetrievalStrategy getBeanStoreRetrievalStrategy()
    • 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
    • cleanupSession

      public static void cleanupSession(com.vaadin.server.VaadinSession session)
      Cleans up everything associated with the scope of a specific session.
      Parameters:
      session - the Vaadin session for which to do the clean up, not null