public class WeldContainer extends Object
Constructor and Description |
---|
WeldContainer(WeldDeployment deployment,
org.jboss.weld.bootstrap.api.Environment environment) |
Modifier and Type | Method and Description |
---|---|
<T extends org.jboss.weld.bootstrap.api.Service> |
addWeldService(Class<T> type,
T service)
Adds a
Service to the deployment. |
Set<org.jboss.weld.bootstrap.spi.BeanDeploymentArchive> |
getBeanDeploymentArchives()
get all beans deployment archives in the deployment
|
javax.enterprise.inject.spi.BeanManager |
getBeanManager()
Gets the
BeanManager linked to the additional classes bean deployment archive. |
javax.enterprise.inject.spi.BeanManager |
getBeanManager(org.jboss.weld.bootstrap.spi.BeanDeploymentArchive archive)
Gets the
BeanManager for a given bean deployment archive. |
javax.enterprise.inject.spi.BeanManager |
getBeanManager(String beanArchiveId)
Gets the
BeanManager for a given bean deployment archive id. |
boolean |
isStarted() |
void |
start()
Starts the weld container
|
void |
stop()
Stops the container
|
public WeldContainer(WeldDeployment deployment, org.jboss.weld.bootstrap.api.Environment environment)
public void start()
IllegalStateException
- if the container is already runningpublic void stop()
IllegalStateException
- if the container is not runningpublic javax.enterprise.inject.spi.BeanManager getBeanManager(org.jboss.weld.bootstrap.spi.BeanDeploymentArchive archive)
BeanManager
for a given bean deployment archive.IllegalStateException
- if the container is not runningpublic javax.enterprise.inject.spi.BeanManager getBeanManager(String beanArchiveId)
BeanManager
for a given bean deployment archive id.IllegalStateException
- if the container is not runningIllegalArgumentException
- if the bean deployment archive id is not foundpublic <T extends org.jboss.weld.bootstrap.api.Service> void addWeldService(Class<T> type, T service)
Service
to the deployment. This method must not be called after the container has startedpublic javax.enterprise.inject.spi.BeanManager getBeanManager()
BeanManager
linked to the additional classes bean deployment archive. This BeanManager has access to all
beans in a deploymentIllegalStateException
- if the container is not runningpublic Set<org.jboss.weld.bootstrap.spi.BeanDeploymentArchive> getBeanDeploymentArchives()
public boolean isStarted()
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All rights reserved.