Class VaadinSessionScopedContext

java.lang.Object
org.apache.deltaspike.core.util.context.AbstractContext
com.vaadin.cdi.internal.VaadinSessionScopedContext
All Implemented Interfaces:
jakarta.enterprise.context.spi.Context

public class VaadinSessionScopedContext extends org.apache.deltaspike.core.util.context.AbstractContext
Context for VaadinSessionScoped. Stores contextuals in VaadinSession. Other Vaadin CDI contexts are stored in the corresponding VaadinSessionScoped context.
Since:
3.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    VaadinSessionScopedContext(jakarta.enterprise.inject.spi.BeanManager beanManager)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    destroy(com.vaadin.server.VaadinSession session)
     
    protected org.apache.deltaspike.core.util.context.ContextualStorage
    getContextualStorage(jakarta.enterprise.context.spi.Contextual<?> contextual, boolean createIfNotExist)
     
    Class<? extends Annotation>
     
    static boolean
    Guess whether this context is undeployed.
    boolean
     

    Methods inherited from class org.apache.deltaspike.core.util.context.AbstractContext

    checkActive, destroy, destroyAllActive, destroyAllActive, destroyBean, get, get, getActiveContextualStorages, isPassivatingScope

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • VaadinSessionScopedContext

      public VaadinSessionScopedContext(jakarta.enterprise.inject.spi.BeanManager beanManager)
  • Method Details

    • getContextualStorage

      protected org.apache.deltaspike.core.util.context.ContextualStorage getContextualStorage(jakarta.enterprise.context.spi.Contextual<?> contextual, boolean createIfNotExist)
      Specified by:
      getContextualStorage in class org.apache.deltaspike.core.util.context.AbstractContext
    • getScope

      public Class<? extends Annotation> getScope()
    • isActive

      public boolean isActive()
    • destroy

      public static void destroy(com.vaadin.server.VaadinSession session)
    • guessContextIsUndeployed

      public static boolean guessContextIsUndeployed()
      Guess whether this context is undeployed. Tomcat expires sessions after contexts are undeployed. Need this guess to prevent exceptions when try to properly destroy contexts on session expiration.
      Returns:
      true when context is not active, but sure it should