Class ContextUtils

java.lang.Object
com.vaadin.quarkus.context.ContextUtils

@Typed public abstract class ContextUtils extends Object
A modified copy of org.apache.deltaspike.core.util.ContextUtils. A set of utility methods for working with contexts.
  • Method Details

    • isContextActive

      public static boolean isContextActive(Class<? extends Annotation> scopeAnnotationClass)
      Checks if the context for the given scope annotation is active.
      Parameters:
      scopeAnnotationClass - The scope annotation (e.g. @RequestScoped.class)
      Returns:
      If the context is active.
    • isContextActive

      public static boolean isContextActive(Class<? extends Annotation> scopeAnnotationClass, jakarta.enterprise.inject.spi.BeanManager beanManager)
      Checks if the context for the given scope annotation is active.
      Parameters:
      scopeAnnotationClass - The scope annotation (e.g. @RequestScoped.class)
      beanManager - The BeanManager
      Returns:
      If the context is active.