public interface Bootstrap
startContainer(Environment, Deployment)
startInitialization()
deployBeans()
validateBeans()
endInitialization()
shutdown()
Modifier and Type | Method and Description |
---|---|
Bootstrap |
deployBeans()
Creates and deploys the application's beans:
Creates and deploys the discovered beans
Creates and deploys the built-in beans defined by the CDI specification
Finally the
AfterBeanDiscovery is event is fired |
Bootstrap |
endInitialization()
Cleans up after the initialization
|
WeldManager |
getManager(BeanDeploymentArchive beanDeploymentArchive)
Get the manager used for the given beanDeploymentArchive.
|
Iterable<Metadata<javax.enterprise.inject.spi.Extension>> |
loadExtensions(ClassLoader classLoader)
Load CDI extensions using the provided ClassLoader
|
BeansXml |
parse(Iterable<URL> urls)
Parse the specified URLs as a series of beans.xml file and merge the result.
|
BeansXml |
parse(Iterable<URL> urls,
boolean removeDuplicates)
Parse the specified URLs as a series of beans.xml file and merge the result.
|
BeansXml |
parse(URL url)
Parse the specified URL as a beans.xml file.
|
void |
shutdown()
Causes the container to clean up and shutdown
Before the contain is shutdown the
BeforeShutdown event is fired |
Bootstrap |
startContainer(Environment environment,
Deployment deployment)
Creates the application container:
Checks that the services required by the environment have been provided
Adds container provided services
Creates and initializes the built in contexts
Creates the manager
context
|
Bootstrap |
startInitialization()
Starts the application container initialization process:
Reads metadata from beans.xml and the
Deployment service
Starts the application context
Starts the request context which lasts until endInitialization() is called
Discovers and creates Extension service providers
Finally, the BeforeBeanDiscovery event is fired. |
Bootstrap |
validateBeans()
Validates the deployment.
|
Bootstrap startContainer(Environment environment, Deployment deployment)
environment
- the environment in use, by default Environments.EE
deployment
- the Deployment to be bootedIllegalStateException
- if not all the services required for the given environment are availableBootstrap startInitialization()
Deployment
serviceendInitialization()
is calledExtension
service providersBeforeBeanDiscovery
event is fired.Bootstrap deployBeans()
AfterBeanDiscovery
is event is firedBootstrap validateBeans()
AfterDeploymentValidation
event is firedBootstrap endInitialization()
void shutdown()
BeforeShutdown
event is firedWeldManager getManager(BeanDeploymentArchive beanDeploymentArchive)
startContainer(Environment, Deployment)
has not been called, this method will return null.
If the beanDeploymentArchive is not known to Weld (for example, it was not passed to the Weld as part of the
Deployment
, or has not yet been requested by Deployment.loadBeanDeploymentArchive(Class)
), null will be
returned.beanDeploymentArchive
- the given beanDeploymentArchiveBeansXml parse(URL url)
url
- the url to parseIllegalArgumentException
- if the URL cannot be openedBeansXml parse(Iterable<URL> urls)
urls
- the urls to parseIllegalArgumentException
- if the URL cannot be openedBeansXml parse(Iterable<URL> urls, boolean removeDuplicates)
urls
- the urls to parseremoveDuplicates
- whether duplicate entries (alternatives, interceptors, etc) are removedIllegalArgumentException
- if the URL cannot be openedIterable<Metadata<javax.enterprise.inject.spi.Extension>> loadExtensions(ClassLoader classLoader)
classLoader
- the ClassLoader to use to load the extensionsIllegalArgumentException
- if classLoader is nullCopyright © 2008-2015. All Rights Reserved.