[jboss-svn-commits] JBL Code SVN: r24197 - in labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer: deployers and 1 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Dec 2 03:11:40 EST 2008
Author: beve
Date: 2008-12-02 03:11:39 -0500 (Tue, 02 Dec 2008)
New Revision: 24197
Added:
labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/config/package.html
labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/package.html
labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/metadata/package.html
Modified:
labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/config/DeploymentUnitResourceLocator.java
labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbDeployment.java
labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbParserDeployer.java
labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployer.java
labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/metadata/EsbMetaData.java
Log:
Added javadocs and package.html to satisfy checkstyle
Modified: labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/config/DeploymentUnitResourceLocator.java
===================================================================
--- labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/config/DeploymentUnitResourceLocator.java 2008-12-02 07:41:45 UTC (rev 24196)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/config/DeploymentUnitResourceLocator.java 2008-12-02 08:11:39 UTC (rev 24197)
@@ -45,7 +45,8 @@
private ClassLoader deploymentUnitClassloader;
/**
- * Sole contructor
+ * Sole contructor.
+ *
* @param classloader The deployment units classloader.
*/
public DeploymentUnitResourceLocator(final ClassLoader classloader)
@@ -81,7 +82,7 @@
{
return forName(className);
}
- catch(final ClassNotFoundException e)
+ catch (final ClassNotFoundException e)
{
// fallback to normal classloading
return ClassUtil.forName(className, caller);
Added: labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/config/package.html
===================================================================
--- labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/config/package.html (rev 0)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/config/package.html 2008-12-02 08:11:39 UTC (rev 24197)
@@ -0,0 +1,8 @@
+<html>
+<head></head>
+<body>
+JBoss ESB config classes for JBoss MicroContainer.
+
+<h2>Package Specification</h2>
+</body>
+</html>
\ No newline at end of file
Modified: labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbDeployment.java
===================================================================
--- labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbDeployment.java 2008-12-02 07:41:45 UTC (rev 24196)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbDeployment.java 2008-12-02 08:11:39 UTC (rev 24197)
@@ -71,9 +71,9 @@
/**
* Creates the EsbDeploymentRuntime when called by the MicroContainer lifecycle.
*
- * @throws DeploymentException
+ * @throws DeploymentException If DeploymentRuntime could not be created.
*/
- public void create() throws DeploymentException
+ public final void create() throws DeploymentException
{
// TODO: Fix classloading..make it play nicely with MC. Daniel
runtime = new DeploymentRuntime(new DeploymentUnitResourceLocator(getClass().getClassLoader()));
@@ -84,9 +84,9 @@
/**
* Deploys the EsbRuntimeDeployment when called by the MicroContainer lifecycle.
*
- * @throws DeploymentException
+ * @throws DeploymentException If an exception occurs while starting the DeploymentRuntime
*/
- public void start() throws DeploymentException
+ public final void start() throws DeploymentException
{
runtime.deploy();
}
@@ -94,9 +94,9 @@
/**
* Undeploys the EsbRuntimeDeployment when called by the MicroContainer lifecycle.
*
- * @throws DeploymentException
+ * @throws DeploymentException If an exception occurs while stopping the DeploymentRuntime
*/
- public void stop() throws DeploymentException
+ public final void stop() throws DeploymentException
{
if (runtime != null)
{
@@ -104,12 +104,22 @@
}
}
- public DeploymentUnit getDeploymentUnit()
+ /**
+ * Just retrieves the DeploymentUnit.
+ *
+ * @return DeploymentUnit The deployment unit for this EsbDeployment.
+ */
+ public final DeploymentUnit getDeploymentUnit()
{
return deploymentUnit;
}
- public String getDeploymentName()
+ /**
+ * Just retrieves the deployment name.
+ *
+ * @return String The name of this deployment.
+ */
+ public final String getDeploymentName()
{
return deploymentName;
}
Modified: labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbParserDeployer.java
===================================================================
--- labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbParserDeployer.java 2008-12-02 07:41:45 UTC (rev 24196)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbParserDeployer.java 2008-12-02 08:11:39 UTC (rev 24197)
@@ -87,14 +87,23 @@
* @param file The virtual file of the deployment
* @param metaData A possible pre-existing EsbMetaData
* @return EsbMetaData {@link EsbMetaData} created with the virtual file of the deployment and the archive name.
+ * @throws DeploymentException If an exception occurs while trying parsing the deployment.
*/
@Override
- protected EsbMetaData parse(final VFSDeploymentUnit deploymentUnit, final VirtualFile file, final EsbMetaData metaData) throws DeploymentException
+ protected final EsbMetaData parse(final VFSDeploymentUnit deploymentUnit, final VirtualFile file, final EsbMetaData metaData) throws DeploymentException
{
final DeploymentUnit esbDeploymentUnit = createEsbDeploymentUnit(deploymentUnit, file);
return new EsbMetaData(esbDeploymentUnit, file.getPathName());
}
+ /**
+ * Creates an ESB {@link DeploymentUnit}.
+ *
+ * @param deploymentUnit The MC deployment unit.
+ * @param file The file representing the deployment.
+ * @return DeploymentUnit The ESB Deployment unit.
+ * @throws DeploymentException If an excption occurs while creating the deployment unit.
+ */
private DeploymentUnit createEsbDeploymentUnit(final VFSDeploymentUnit deploymentUnit, final VirtualFile file) throws DeploymentException
{
log.info("Parsing ESB configuration'" + file + "'");
@@ -111,6 +120,13 @@
}
}
+ /**
+ * Tries to rescursively find a file that ends with "-esb.xml".
+ *
+ * @param file The virtual file. Can point to a file or a directory which will be searched.
+ * @return VirtualFile VirtualFile representing a found configuration file.
+ * @throws DeploymentException If not configuration file could be found, or more than one was found.
+ */
private VirtualFile findEsbConfigFile(final VirtualFile file) throws DeploymentException
{
if (file.getName().endsWith(ESB_FILE_SUFFIX))
@@ -144,9 +160,19 @@
}
}
+ /**
+ * Filter for filtering out ESB configuration files.
+ *
+ */
private static class EsbConfigFileFilter implements VirtualFileFilter
{
- public boolean accepts(VirtualFile file)
+ /**
+ * Accepts only files ending with the ESB_FILE_SUFFIX.
+ * @param file The file to filter.
+ * @return true If the file name ends with "-esb.xml".
+ *
+ */
+ public boolean accepts(final VirtualFile file)
{
return file.getName().endsWith(ESB_FILE_SUFFIX);
}
Modified: labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployer.java
===================================================================
--- labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployer.java 2008-12-02 07:41:45 UTC (rev 24196)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/EsbRuntimeDeployer.java 2008-12-02 08:11:39 UTC (rev 24197)
@@ -69,7 +69,7 @@
*
*/
@Override
- public void deploy(final DeploymentUnit deploymentUnit, final EsbMetaData esbMetaData)
+ public final void deploy(final DeploymentUnit deploymentUnit, final EsbMetaData esbMetaData)
{
final BeanMetaData beanMetaData = createBeanMetaData(deploymentUnit, esbMetaData);
deploymentUnit.addAttachment(BeanMetaData.class, beanMetaData);
@@ -77,6 +77,13 @@
log.info("Created beanMetaData : " + beanMetaData);
}
+ /**
+ * Creates a {@link BeanMetaData} that describes the {@link EsbDeployment} class.
+ *
+ * @param deploymentUnit The deployment unit to deploy.
+ * @param esbMetaData The ESB MetaData that is associated with the deployment unit.
+ * @return BeanMetaData The {@link BeanMetaData} describing the EsbDeployment class
+ */
private BeanMetaData createBeanMetaData(final DeploymentUnit deploymentUnit, final EsbMetaData esbMetaData)
{
BeanMetaDataBuilder bmdBuilder = BeanMetaDataBuilder.createBuilder("jboss.esb." + deploymentUnit.getName(), EsbDeployment.class.getName());
Added: labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/package.html
===================================================================
--- labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/package.html (rev 0)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/deployers/package.html 2008-12-02 08:11:39 UTC (rev 24197)
@@ -0,0 +1,8 @@
+<html>
+<head></head>
+<body>
+JBoss ESB deployer classes for JBoss MicroContainer.
+
+<h2>Package Specification</h2>
+</body>
+</html>
\ No newline at end of file
Modified: labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/metadata/EsbMetaData.java
===================================================================
--- labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/metadata/EsbMetaData.java 2008-12-02 07:41:45 UTC (rev 24196)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/metadata/EsbMetaData.java 2008-12-02 08:11:39 UTC (rev 24197)
@@ -38,6 +38,7 @@
*/
public class EsbMetaData implements Serializable
{
+ /** Serial version unique identifier. */
private static final long serialVersionUID = 0L;
/**
@@ -54,8 +55,8 @@
* Creates a EsbMetaData with the jboss-esb.xml as a VirtualFile and
* the name of the .esb archive.
*
- * @param fileURL The VirtualFile object to jboss-esb.xml.
- * @param archiveName The name of the .esb archive.
+ * @param deploymentUnit The ESB {@link DeploymentUnit}.
+ * @param archiveName The name of the .esb archive.
*/
public EsbMetaData(final DeploymentUnit deploymentUnit, final String archiveName)
{
@@ -63,18 +64,32 @@
this.archiveName = archiveName;
}
- public DeploymentUnit getDeploymentUnit()
+ /**
+ * Gets the ESB DeploymentUnit.
+ * @return DeploymentUnit The ESB {@link DeploymentUnit}.
+ */
+ public final DeploymentUnit getDeploymentUnit()
{
return deploymentUnit;
}
- public String getAchiveName()
+ /**
+ * Gets the name of the archive that this metadata came from.
+ *
+ * @return String The name of the archive that this metadata came from.
+ */
+ public final String getAchiveName()
{
return archiveName;
}
+ /**
+ * toString.
+ *
+ * @return String String representation of this metadata.
+ */
@Override
- public String toString()
+ public final String toString()
{
final StringBuilder sb = new StringBuilder();
sb.append("EsbMetaData [deploymentUnit='").append(deploymentUnit);
Added: labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/metadata/package.html
===================================================================
--- labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/metadata/package.html (rev 0)
+++ labs/jbossesb/workspace/skeagh/container/microcontainer/src/main/java/org/jboss/esb/microcontainer/metadata/package.html 2008-12-02 08:11:39 UTC (rev 24197)
@@ -0,0 +1,8 @@
+<html>
+<head></head>
+<body>
+JBoss ESB metadata classes for JBoss MicroContainer.
+
+<h2>Package Specification</h2>
+</body>
+</html>
\ No newline at end of file
More information about the jboss-svn-commits
mailing list