Interface Environment

  • All Known Implementing Classes:
    Environments

    public interface Environment
    Represents an environment. Specifies the services Weld requires
    Author:
    Pete Muir
    • Method Detail

      • getRequiredDeploymentServices

        Set<Class<? extends Service>> getRequiredDeploymentServices()
        The deployment scoped services required for this environment
        Returns:
        the services to require
      • getRequiredBeanDeploymentArchiveServices

        Set<Class<? extends Service>> getRequiredBeanDeploymentArchiveServices()
      • isEEModulesAware

        default boolean isEEModulesAware()
        Environment aware of EE modules. In such environment each bean archive which belongs to a module should register EEModuleDescriptor
        Returns:
        true by default
      • automaticallyHandleStartupShutdownEvents

        default boolean automaticallyHandleStartupShutdownEvents()
        Since CDI 4.0, there is a requirement to fire Startup event when the container is ready to accept requests and Shutdown before container shutdown.

        By default, Weld fires these events close to @Initialized(ApplicationScoped.class). However, integrators may choose to fire it at later point if they, for instance, need to make sure other related technologies or libraries also bootstrap successfully.

        Overriding this method and returning false means that Weld will not attempt to fire these events and this responsibility then lies with the integrator.

        Returns:
        true by default
        See Also:
        Startup, Shutdown