Package com.vaadin.cdi.context
Class VaadinSessionScopedContext
- java.lang.Object
-
- org.apache.deltaspike.core.util.context.AbstractContext
-
- com.vaadin.cdi.context.VaadinSessionScopedContext
-
- All Implemented Interfaces:
javax.enterprise.context.spi.Context
public class VaadinSessionScopedContext extends org.apache.deltaspike.core.util.context.AbstractContextContext for@VaadinSessionScopedbeans.Stores contextuals in
VaadinSession. Other Vaadin CDI contexts are stored in the correspondingVaadinSessionScopedcontext.- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description VaadinSessionScopedContext(javax.enterprise.inject.spi.BeanManager beanManager)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voiddestroy(com.vaadin.flow.server.VaadinSession session)protected org.apache.deltaspike.core.util.context.ContextualStoragegetContextualStorage(javax.enterprise.context.spi.Contextual<?> contextual, boolean createIfNotExist)Class<? extends Annotation>getScope()static booleanguessContextIsUndeployed()Guess whether this context is undeployed.booleanisActive()
-
-
-
Method Detail
-
getContextualStorage
protected org.apache.deltaspike.core.util.context.ContextualStorage getContextualStorage(javax.enterprise.context.spi.Contextual<?> contextual, boolean createIfNotExist)- Specified by:
getContextualStoragein classorg.apache.deltaspike.core.util.context.AbstractContext
-
getScope
public Class<? extends Annotation> getScope()
-
isActive
public boolean isActive()
-
destroy
public static void destroy(com.vaadin.flow.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
-
-