Class Container


  • public class Container
    extends Object
    A Weld application container
    Author:
    pmuir
    • Constructor Detail

      • Container

        public Container​(String contextId,
                         BeanManagerImpl deploymentManager,
                         org.jboss.weld.bootstrap.api.ServiceRegistry deploymentServices)
      • Container

        public Container​(BeanManagerImpl deploymentManager,
                         org.jboss.weld.bootstrap.api.ServiceRegistry deploymentServices)
      • Container

        public Container​(String contextId,
                         BeanManagerImpl deploymentManager,
                         org.jboss.weld.bootstrap.api.ServiceRegistry deploymentServices,
                         org.jboss.weld.bootstrap.api.Environment environment)
    • Method Detail

      • instance

        public static Container instance()
        Get the container for the current application deployment
        Returns:
      • available

        public static boolean available()
      • available

        public static boolean available​(String contextId)
      • isSet

        public static boolean isSet​(String contextId)
      • initialize

        public static void initialize​(BeanManagerImpl deploymentManager,
                                      org.jboss.weld.bootstrap.api.ServiceRegistry deploymentServices)
        Initialize the container for the current application deployment
        Parameters:
        deploymentManager -
        deploymentServices -
      • initialize

        public static void initialize​(String contextId,
                                      BeanManagerImpl deploymentManager,
                                      org.jboss.weld.bootstrap.api.ServiceRegistry deploymentServices)
      • initialize

        public static void initialize​(String contextId,
                                      BeanManagerImpl deploymentManager,
                                      org.jboss.weld.bootstrap.api.ServiceRegistry deploymentServices,
                                      org.jboss.weld.bootstrap.api.Environment environment)
      • cleanup

        public void cleanup()
        Cause the container to be cleaned up, including all registered bean managers, and all deployment services
      • deploymentManager

        public BeanManagerImpl deploymentManager()
        Gets the manager for this application deployment
      • beanDeploymentArchives

        public Map<org.jboss.weld.bootstrap.spi.BeanDeploymentArchive,​BeanManagerImpl> beanDeploymentArchives()
      • getBeanManager

        public BeanManagerImpl getBeanManager​(String key)
        Get the BeanManager for a given key
        Parameters:
        key -
        Returns:
      • services

        public org.jboss.weld.bootstrap.api.ServiceRegistry services()
        Get the services for this application deployment
        Returns:
        the deploymentServices
      • putBeanDeployments

        public void putBeanDeployments​(BeanDeploymentArchiveMapping bdaMapping)
        Add sub-deployment units to the container
        Parameters:
        bdaMapping -
      • getEnvironment

        public static org.jboss.weld.bootstrap.api.Environment getEnvironment()
        Returns Environment that this container was booted in, or null if not set or invoked too early in the bootstrapping process. Note that should there be multiple containers active, this will return the Environment that the first container was bootstrapped in, unless it was null.
        Returns:
        Environment or null