Package org.jboss.weld
Class Container
- java.lang.Object
-
- org.jboss.weld.Container
-
public class Container extends Object
A Weld application container- Author:
- pmuir
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONTEXT_ID_KEYstatic ThreadLocal<String>currentId
-
Constructor Summary
Constructors Constructor Description Container(String contextId, BeanManagerImpl deploymentManager, org.jboss.weld.bootstrap.api.ServiceRegistry deploymentServices)Container(BeanManagerImpl deploymentManager, org.jboss.weld.bootstrap.api.ServiceRegistry deploymentServices)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BeanManagerImplactivityManager(String key)Get the activity manager for a given keyStringaddActivity(BeanManagerImpl manager)Add an activitystatic booleanavailable()static booleanavailable(String contextId)Map<org.jboss.weld.bootstrap.spi.BeanDeploymentArchive,BeanManagerImpl>beanDeploymentArchives()voidcleanup()Cause the container to be cleaned up, including all registered bean managers, and all deployment servicesBeanManagerImpldeploymentManager()Gets the manager for this application deploymentContainerStategetState()static voidinitialize(String contextId, BeanManagerImpl deploymentManager, org.jboss.weld.bootstrap.api.ServiceRegistry deploymentServices)static voidinitialize(BeanManagerImpl deploymentManager, org.jboss.weld.bootstrap.api.ServiceRegistry deploymentServices)Initialize the container for the current application deploymentstatic Containerinstance()Get the container for the current application deploymentstatic Containerinstance(String contextId)static Containerinstance(AnnotatedTypeIdentifier identifier)static Containerinstance(BeanManagerImpl manager)voidputBeanDeployments(BeanDeploymentArchiveMapping bdaMapping)Add sub-deployment units to the containerorg.jboss.weld.bootstrap.api.ServiceRegistryservices()Get the services for this application deploymentvoidsetState(ContainerState state)
-
-
-
Field Detail
-
CONTEXT_ID_KEY
public static final String CONTEXT_ID_KEY
- See Also:
- Constant Field Values
-
currentId
public static final ThreadLocal<String> currentId
-
-
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)
-
-
Method Detail
-
instance
public static Container instance()
Get the container for the current application deployment- Returns:
-
available
public static boolean available()
-
instance
public static Container instance(BeanManagerImpl manager)
-
instance
public static Container instance(AnnotatedTypeIdentifier identifier)
-
available
public static boolean available(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)
-
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()
-
activityManager
public BeanManagerImpl activityManager(String key)
Get the activity manager for a given key- Parameters:
key-- Returns:
-
addActivity
public String addActivity(BeanManagerImpl manager)
Add an activity- Parameters:
manager-- 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)
-
-