Class Container

java.lang.Object
org.jboss.weld.Container

public class Container extends Object
A Weld application container
Author:
pmuir
  • Field Details

  • Constructor Details

    • 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 Details

    • instance

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

      public static boolean available()
    • instance

      public static Container instance(String contextId)
    • instance

      public static Container instance(BeanManagerImpl manager)
    • instance

      public static Container instance(AnnotatedTypeIdentifier identifier)
    • 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 -
    • getState

      public ContainerState getState()
    • setState

      public void setState(ContainerState state)
    • 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