org.jboss.weld.bootstrap.api
Interface Bootstrap

All Known Implementing Classes:
ForwardingBootstrap

public interface Bootstrap

Application container initialization API for Weld. To initialize the container you must call, in this order:

  1. #startContainer()
  2. startInitialization()
  3. deployBeans()
  4. validateBeans()
  5. endInitialization()
To stop the container and clean up, you must call shutdown()

Author:
Pete Muir

Method Summary
 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 this beanDeploymentArchive.
 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, BeanStore beanStore)
          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
 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.
 

Method Detail

startContainer

Bootstrap startContainer(Environment environment,
                         Deployment deployment,
                         BeanStore beanStore)
Creates the application container:

Parameters:
beanStore - the bean store to use as backing for the application context
environment - the environment in use, by default Environments.EE
deployment - the Deployment to be booted
Throws:
java.lang.IllegalStateException - if not all the services required for the given environment are available

startInitialization

Bootstrap startInitialization()
Starts the application container initialization process: Finally, the BeforeBeanDiscovery event is fired.


deployBeans

Bootstrap deployBeans()
Creates and deploys the application's beans: Finally the AfterBeanDiscovery is event is fired


validateBeans

Bootstrap validateBeans()
Validates the deployment. After validation, the AfterDeploymentValidation event is fired


endInitialization

Bootstrap endInitialization()
Cleans up after the initialization


shutdown

void shutdown()
Causes the container to clean up and shutdown Before the contain is shutdown the BeforeShutdown event is fired


getManager

WeldManager getManager(BeanDeploymentArchive beanDeploymentArchive)
Get the manager used for this beanDeploymentArchive. If #startContainer() 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.

Returns:
the manager or null if not yet available or not found.


Copyright © 2008-2009 Seam Framework. All Rights Reserved.