Class ForwardingBootstrap

java.lang.Object
org.jboss.weld.bootstrap.api.helpers.ForwardingBootstrap
All Implemented Interfaces:
Bootstrap

public abstract class ForwardingBootstrap extends Object implements Bootstrap
Implementation of Bootstrap which supports the decorator pattern
Author:
Pete Muir
  • Constructor Details

    • ForwardingBootstrap

      public ForwardingBootstrap()
  • Method Details

    • delegate

      protected abstract Bootstrap delegate()
      Returns the delegate
      Returns:
      delegate
    • getManager

      public WeldManager getManager(BeanDeploymentArchive beanDeploymentArchive)
      Description copied from interface: Bootstrap
      Get the manager used for the given beanDeploymentArchive. If Bootstrap.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.
      Specified by:
      getManager in interface Bootstrap
      Parameters:
      beanDeploymentArchive - the given beanDeploymentArchive
      Returns:
      the manager or null if not yet available or not found.
    • startContainer

      public Bootstrap startContainer(Environment environment, Deployment deployment)
      Description copied from interface: Bootstrap
      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
      Specified by:
      startContainer in interface Bootstrap
      Parameters:
      environment - the environment in use, by default Environments.EE
      deployment - the Deployment to be booted
      Returns:
      self
    • shutdown

      public void shutdown()
      Description copied from interface: Bootstrap
      Causes the container to clean up and shutdown Before the contain is shutdown the BeforeShutdown event is fired
      Specified by:
      shutdown in interface Bootstrap
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • deployBeans

      public Bootstrap deployBeans()
      Description copied from interface: Bootstrap
      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
      Specified by:
      deployBeans in interface Bootstrap
      Returns:
      self
    • endInitialization

      public Bootstrap endInitialization()
      Description copied from interface: Bootstrap
      Cleans up after the initialization
      Specified by:
      endInitialization in interface Bootstrap
      Returns:
      self
    • startInitialization

      public Bootstrap startInitialization()
      Description copied from interface: Bootstrap
      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 Bootstrap.endInitialization() is called
      • Discovers and creates Extension service providers
      Finally, the BeforeBeanDiscovery event is fired.
      Specified by:
      startInitialization in interface Bootstrap
      Returns:
      self
    • validateBeans

      public Bootstrap validateBeans()
      Description copied from interface: Bootstrap
      Validates the deployment. After validation, the AfterDeploymentValidation event is fired
      Specified by:
      validateBeans in interface Bootstrap
      Returns:
      self