Class VaadinSessionScopedContext.ContextualStorageManager

java.lang.Object
com.vaadin.cdi.context.VaadinSessionScopedContext.ContextualStorageManager
Enclosing class:
VaadinSessionScopedContext

@ApplicationScoped public static class VaadinSessionScopedContext.ContextualStorageManager extends Object
For internal use only.
Since:
16.0.2
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final String
    Name of the session attribute holding the contextual storage.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new storage manager.
  • Method Summary

    Modifier and Type
    Method
    Description
    getContextualStorage(jakarta.enterprise.context.spi.Contextual<?> contextual, boolean createIfNotExist)
    Gets the contextual storage of the current session.
    protected boolean
    Checks whether the context is active, i.e. there is a current session and it is locked by the current thread.

    Methods inherited from class java.lang.Object

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

    • ATTRIBUTE_NAME

      protected static final String ATTRIBUTE_NAME
      Name of the session attribute holding the contextual storage.
  • Constructor Details

    • ContextualStorageManager

      public ContextualStorageManager()
      Creates a new storage manager.
  • Method Details

    • isActive

      protected boolean isActive()
      Checks whether the context is active, i.e. there is a current session and it is locked by the current thread.
      Returns:
      true if the context is active, false otherwise
    • getContextualStorage

      protected ContextualStorage getContextualStorage(jakarta.enterprise.context.spi.Contextual<?> contextual, boolean createIfNotExist)
      Gets the contextual storage of the current session.
      Parameters:
      contextual - the contextual the storage is requested for
      createIfNotExist - whether to create the storage if it does not exist yet
      Returns:
      the contextual storage, or null if it does not exist and createIfNotExist is false
      Throws:
      IllegalStateException - if there is no current session