Skip to content

Commit

Permalink
Formatting and whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
jharting committed Mar 8, 2013
1 parent c6bd33b commit bf75774
Show file tree
Hide file tree
Showing 4 changed files with 226 additions and 268 deletions.
50 changes: 25 additions & 25 deletions weld-spi/src/main/java/org/jboss/weld/bootstrap/api/Bootstrap.java
Expand Up @@ -9,7 +9,7 @@
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
Expand All @@ -32,21 +32,21 @@

/**
* Application container initialization API for Weld.
*
*
* To initialize the container you must call, in this order:
*
*
* <ol>
* <li>{@link #startContainer()}</li>
* <li>{@link #startInitialization()}</li>
* <li>{@link #deployBeans()}</li>
* <li>{@link #validateBeans()}</li>
* <li>{@link #endInitialization()}</li>
* </ol>
*
*
* To stop the container and clean up, you must call {@link #shutdown()}
*
*
* @author Pete Muir
*
*
*/
public interface Bootstrap
{
Expand All @@ -60,96 +60,96 @@ public interface Bootstrap
* <li>Creates and initializes the built in contexts</li>
* <li>Creates the manager</li>
* </ul>
*
*
* context
* @param environment the environment in use, by default
* {@link Environments.EE}
* @param deployment the Deployment to be booted
* @throws IllegalStateException if not all the services required for the
* given environment are available
*
*
*/
public Bootstrap startContainer(Environment environment, Deployment deployment);

/**
* Starts the application container initialization process:
*
*
* <ul>
* <li>Reads metadata from beans.xml and the {@link Deployment} service</li>
* <li>Starts the application context</li>
* <li>Starts the request context which lasts until
* {@link #endInitialization()} is called</li>
* <li>Discovers and creates {@link Extension} service providers</li>
* </ul>
*
*
* Finally, the {@link BeforeBeanDiscovery} event is fired.
*
*
*/
public Bootstrap startInitialization();

/**
* Creates and deploys the application's beans:
*
*
* <ul>
* <li>Creates and deploys the discovered beans</li>
* <li>Creates and deploys the built-in beans defined by the CDI
* specification</li>
* </ul>
*
*
* Finally the {@link AfterBeanDiscovery} is event is fired
*/
public Bootstrap deployBeans();

/**
* Validates the deployment.
*
*
* After validation, the {@link AfterDeploymentValidation} event is fired
*/
public Bootstrap validateBeans();

/**
* Cleans up after the initialization
*
*
*/
public Bootstrap endInitialization();

/**
* Causes the container to clean up and shutdown
*
*
* Before the contain is shutdown the {@link BeforeShutdown} event is fired
*/
public void shutdown();

/**
* Get the manager used for this beanDeploymentArchive.
*
*
* If {@link #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 {@link Deployment}, or has
* not yet been requested by
* {@link Deployment#loadBeanDeploymentArchive(Class)}), null will be
* returned.
*
*
* @return the manager or null if not yet available or not found.
*/
public WeldManager getManager(BeanDeploymentArchive beanDeploymentArchive);

/**
* Parse the specified URL as a beans.xml file.
*
*
* @param url the url to parse
* @return the BeansXml data structure which represents the URL
* @throws IllegalArgumentException if the URL cannot be opened
*/
public BeansXml parse(URL url);

/**
* Parse the specified URLs as a series of beans.xml file and merge the result.
*
*
* Duplicate entries are not removed.
*
*
* @param url the url to parse
* @return the BeansXml data structure which represents the URL
* @throws IllegalArgumentException if the URL cannot be opened
Expand All @@ -168,7 +168,7 @@ public interface Bootstrap

/**
* Load CDI extensions using the provided ClassLoader
*
*
* @param classLoader the ClassLoader to use to load the extensions
* @throws IllegalArgumentException if classLoader is null
*/
Expand Down
Expand Up @@ -9,7 +9,7 @@
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
Expand All @@ -24,88 +24,78 @@

/**
* Represents a CDI bean deployment archive.
*
* A deployment archive is any library jar, library directory, EJB jar, rar
* archive or any war WEB-INF/classes directory contained in the Java EE
* deployment (as defined in the Java Platform, Enterprise Edition (Java EE)
* Specification, v6, Section 8.1.2).
*
*
* A deployment archive is any library jar, library directory, EJB jar, rar archive or any war WEB-INF/classes directory
* contained in the Java EE deployment (as defined in the Java Platform, Enterprise Edition (Java EE) Specification, v6, Section
* 8.1.2).
*
* TODO Java SE definition of a deployment archive
*
* A bean deployment archive is any deployment archive with a META-INF/beans.xml
* file, or for a war, with a WEB-INF/beans.xml.
*
* The container is allowed to specify a deployment archive as
* {@link BeanDeploymentArchive} even if no beans.xml is present (for example, a
* container could define a deployment archive with container specific metadata
* to be a bean deployment archive).
*
*
* A bean deployment archive is any deployment archive with a META-INF/beans.xml file, or for a war, with a WEB-INF/beans.xml.
*
* The container is allowed to specify a deployment archive as {@link BeanDeploymentArchive} even if no beans.xml is present
* (for example, a container could define a deployment archive with container specific metadata to be a bean deployment
* archive).
*
* @see Deployment
*
*
* @author Pete Muir
*
*
*/
public interface BeanDeploymentArchive
{
public interface BeanDeploymentArchive {

/**
* Get the bean deployment archives which are accessible to this bean deployment archive and adjacent to it in the
* deployment archive graph.
*
* Cycles in the accessible BeanDeploymentArchive graph are allowed. If a cycle is detected by Weld, it will be
* automatically removed by Web Beans. This means any implementor of this interface don't need to worry about circularities.
*
* @return the accessible bean deployment archives
*/
public Collection<BeanDeploymentArchive> getBeanDeploymentArchives();

/**
* Gets all classes in the bean deployment archive
*
* @return the classes, empty if no classes are present
*/
public Collection<String> getBeanClasses();

/**
* Get the bean deployment archives which are accessible to this bean
* deployment archive and adjacent to it in the deployment archive graph.
*
* Cycles in the accessible BeanDeploymentArchive graph are allowed. If a
* cycle is detected by Weld, it will be automatically removed by Web
* Beans. This means any implementor of this interface don't need to worry
* about circularities.
*
* @return the accessible bean deployment archives
*/
public Collection<BeanDeploymentArchive> getBeanDeploymentArchives();
/**
* Get any deployment descriptors in the bean deployment archive.
*
* The container will return a a merged view of the beans.xml per bean deployment archive. This will normally represent a
* single file such as the physical META-INF/beans.xml or WEB-INF/beans.xml)
*
* The container may choose to parse beans.xml itself, or it may use Weld to parse beans.xml
*
* @return the parsed beans.xml
* @see {@link Bootstrap#parse(java.net.URL)}
* @see {@link Bootstrap#parse(Iterable)}
*/
public BeansXml getBeansXml();

/**
* Gets all classes in the bean deployment archive
*
* @return the classes, empty if no classes are present
*/
public Collection<String> getBeanClasses();
/**
* Get all the EJBs in the deployment archive
*
* @return the EJBs, or empty if no EJBs are present or if this is not an EJB archive
*/
public Collection<EjbDescriptor<?>> getEjbs();

/**
* Get any deployment descriptors in the bean deployment archive.
*
* The container will return a a merged view of the beans.xml per bean
* deployment archive. This will normally represent a single file such as the
* physical META-INF/beans.xml or WEB-INF/beans.xml)
*
* The container may choose to parse beans.xml itself, or it may use Weld to
* parse beans.xml
*
* @return the parsed beans.xml
* @see {@link Bootstrap#parse(java.net.URL)}
* @see {@link Bootstrap#parse(Iterable)}
*/
public BeansXml getBeansXml();
/**
* Get the Bean Deployment Archive scoped services
*
* @return
*/
public ServiceRegistry getServices();

/**
* Get all the EJBs in the deployment archive
*
* @return the EJBs, or empty if no EJBs are present or if
* this is not an EJB archive
*/
public Collection<EjbDescriptor<?>> getEjbs();

/**
* Get the Bean Deployment Archive scoped services
*
* @return
*/
public ServiceRegistry getServices();

/**
* Get a string which uniquely identifies the {@link BeanDeploymentArchive} within
* the {@link Deployment}. The identifier must be consistent between multiple
* occurrences of this deployment.
*
* @return
*/
public String getId();
/**
* Get a string which uniquely identifies the {@link BeanDeploymentArchive} within the {@link Deployment}. The identifier
* must be consistent between multiple occurrences of this deployment.
*
* @return
*/
public String getId();

}

0 comments on commit bf75774

Please sign in to comment.