Class VaadinContextualStorage

java.lang.Object
org.apache.deltaspike.core.util.context.ContextualStorage
com.vaadin.cdi.internal.VaadinContextualStorage
All Implemented Interfaces:
Serializable

public class VaadinContextualStorage extends org.apache.deltaspike.core.util.context.ContextualStorage
Customized version of ContextualStorage to also handle beans that are not PassivationCapable. Such beans are used as their own keys, which is not ideal but should work in most single-JVM environments. Note: Supporting non-PassivationCapable beans is theoretical. Not required by the spec, but in reality beans are PassivationCapable. Even for non serializable bean classes. CDI implementations use PassivationCapable beans, because injecting non serializable proxies might block serialization of bean instances in a passivation capable context.
See Also:
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    jakarta.enterprise.context.spi.Contextual<?>
    getBean(Object beanKey)
     
    <T> Object
    getBeanKey(jakarta.enterprise.context.spi.Contextual<T> bean)
     

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

    createContextualInstance, getStorage, isConcurrent

    Methods inherited from class java.lang.Object

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

    • VaadinContextualStorage

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

    • getBeanKey

      public <T> Object getBeanKey(jakarta.enterprise.context.spi.Contextual<T> bean)
      Overrides:
      getBeanKey in class org.apache.deltaspike.core.util.context.ContextualStorage
    • getBean

      public jakarta.enterprise.context.spi.Contextual<?> getBean(Object beanKey)
      Overrides:
      getBean in class org.apache.deltaspike.core.util.context.ContextualStorage