[jboss-cvs] JBossAS SVN: r89595 - projects/microcontainer/trunk/dependency/src/main/java/org/jboss/dependency/spi.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jun 1 07:16:00 EDT 2009
Author: kabir.khan at jboss.com
Date: 2009-06-01 07:16:00 -0400 (Mon, 01 Jun 2009)
New Revision: 89595
Modified:
projects/microcontainer/trunk/dependency/src/main/java/org/jboss/dependency/spi/ControllerContextActions.java
projects/microcontainer/trunk/dependency/src/main/java/org/jboss/dependency/spi/ScopeInfo.java
Log:
[JBKERNEL-14] Javadocs for dependency module
Modified: projects/microcontainer/trunk/dependency/src/main/java/org/jboss/dependency/spi/ControllerContextActions.java
===================================================================
--- projects/microcontainer/trunk/dependency/src/main/java/org/jboss/dependency/spi/ControllerContextActions.java 2009-06-01 10:16:59 UTC (rev 89594)
+++ projects/microcontainer/trunk/dependency/src/main/java/org/jboss/dependency/spi/ControllerContextActions.java 2009-06-01 11:16:00 UTC (rev 89595)
@@ -29,19 +29,21 @@
* The default actions when running the full kernel are on installing to/uninstalling from:
* <ul>
* <li>{@link ControllerState#NOT_INSTALLED} - This is the starting state
- * for {@link ControllerContext}s to be installed</li>
+ * for {@link ControllerContext}s to be installed. Metadata for the bean has been parsed.</li>
* <li>{@link ControllerState#PRE_INSTALL} - Determine the scoping policy
* of the {@link ControllerContext} to see if it should go in the main controller
- * or in a child controller</li>
- * <li>{@link ControllerState#DESCRIBED} - Determine the bean's dependencies</li>
+ * or in a child controller and resolve classloading dependencies.</li>
+ * <li>{@link ControllerState#DESCRIBED} - Determine the bean's extra dependencies that might be brought in from the AOP layer.</li>
* <li>{@link ControllerState#PRE_INSTALL} - Instantiate the bean instance and set it
* in the {@link ControllerContext}'s target</li>
* <li>{@link ControllerState#CONFIGURED} - Configure the bean instance with the properties
* from the bean metadata and perform injection of other bean instances.</li>
- * <li>{@link ControllerState#CREATE} - Call any create/destroy lifecycle methods</li>
- * <li>{@link ControllerState#START} - Call any start/stop lifecycle methods</li>
+ * <li>{@link ControllerState#CREATE} - Call any create/destroy lifecycle methods. All {@link ControllerContext}s we depend on will
+ * also have reached the {@link ControllerState#CREATE}</li>
+ * <li>{@link ControllerState#START} - Call any start/stop lifecycle methods. All {@link ControllerContext}s we depend on will
+ * also have reached the {@link ControllerState#START}</li>
* <li>{@link ControllerState#INSTALLED} - The bean is properly started. Any lifecycle
- * install/uninstall methods are called on the bean</li>
+ * install/uninstall methods are called on the bean and the bean gets added to the list of items the controller supplies.</li>
* </ul>
* If something went wrong installing the {@link ControllerContext}, the {@link ControllerContext}
* enters the {@link ControllerState#ERROR} state.
Modified: projects/microcontainer/trunk/dependency/src/main/java/org/jboss/dependency/spi/ScopeInfo.java
===================================================================
--- projects/microcontainer/trunk/dependency/src/main/java/org/jboss/dependency/spi/ScopeInfo.java 2009-06-01 10:16:59 UTC (rev 89594)
+++ projects/microcontainer/trunk/dependency/src/main/java/org/jboss/dependency/spi/ScopeInfo.java 2009-06-01 11:16:00 UTC (rev 89595)
@@ -23,13 +23,17 @@
import org.jboss.metadata.spi.MetaData;
import org.jboss.metadata.spi.loader.MutableMetaDataLoader;
+import org.jboss.metadata.spi.repository.MetaDataRepository;
import org.jboss.metadata.spi.repository.MutableMetaDataRepository;
import org.jboss.metadata.spi.retrieval.MetaDataRetrieval;
import org.jboss.metadata.spi.scope.Scope;
+import org.jboss.metadata.spi.scope.ScopeFactoryLookup;
import org.jboss.metadata.spi.scope.ScopeKey;
/**
- * ScopeInfo.
+ * ScopeInfo belongs to a {@link ControllerContext}, and is the entry point into the
+ * {@link ControllerContext}'s data in the {@link MetaDataRepository}. Each {@link ControllerContext}
+ * has data stored under a unique {@link ScopeKey}.
*
* @author <a href="adrian at jboss.com">Adrian Brock</a>
* @version $Revision: 1.1 $
@@ -44,7 +48,9 @@
MetaData getMetaData();
/**
- * Add metadata
+ * Associates the passed in metadata repository with the controller context.
+ * The {@link ScopeKey} is created and the metadata repository location for the
+ * controller context is created.
*
* @param repository the repository
* @param context the controller context
@@ -52,7 +58,10 @@
void addMetaData(MutableMetaDataRepository repository, ControllerContext context);
/**
- * Add metadata
+ * Disassociates the passed in metadata repository with the controller context.
+ * The location of the {@link ScopeKey} for the passed in controller context
+ * is removed from the metadata repository.
+ *
*
* @param repository the repository
* @param context the controller context
@@ -60,7 +69,7 @@
void removeMetaData(MutableMetaDataRepository repository, ControllerContext context);
/**
- * Initialise the metadata retrieval
+ * Initialise the metadata retrieval for a given {@link Scope} in {@link ScopeKey}.
*
* @param repository the repository
* @param context the context
@@ -70,7 +79,8 @@
MetaDataRetrieval initMetaDataRetrieval(MutableMetaDataRepository repository, ControllerContext context, Scope scope);
/**
- * Initialise the main metadata retrieval
+ * Initialise the main metadata retrieval. The returned retrieval will contain metadata retrievals for
+ * each level of {@link Scope} in {@link ScopeKey}.
*
* @param repository the repository
* @param context the context
@@ -79,7 +89,8 @@
MetaDataRetrieval initMetaDataRetrieval(MutableMetaDataRepository repository, ControllerContext context);
/**
- * Initialise the main mutable metadata retrieval.
+ * Initialise the main mutable metadata retrieval. The returned mutable metadata loader contains the
+ * location of the context metadata where data can be added.
*
* @param repository the mutable metadata repository
* @param context the controller context
@@ -89,42 +100,52 @@
MutableMetaDataLoader initMutableMetaDataRetrieval(MutableMetaDataRepository repository, ControllerContext context, ScopeKey scopeKey);
/**
- * Get the scope
+ * Get the scope key for the {@link ControllerContext}'s metadata.
*
- * @return the scope
+ * @return the scope key
*/
ScopeKey getScope();
/**
- * Set the scope
+ * Set the scope key for the {@link ControllerContext}'s metadata. This method should only be called by the
+ * {@link Controller}.
*
* @param key the scope key
+ * @throws IllegalArgumentException if null
*/
void setScope(ScopeKey key);
/**
- * Get the mutable scope
+ * Get the mutable scope key for the context
*
- * @return the scope
+ * @return the scope key
*/
ScopeKey getMutableScope();
/**
- * Set the mutable scope
+ * Set the mutable scope This method should only be called by the
+ * {@link Controller}.
*
* @param key the scope key
+ * @throws IllegalArgumentException if null
*/
void setMutableScope(ScopeKey key);
/**
- * Get the install scope
+ * Get the install scope. If a scoped {@link Controller} (i.e. a child of the main {@link Controller})
+ * was used, by annotating the {@link ControllerContext} with annotations annotated with {@link ScopeFactoryLookup}
+ * this is the location of the scoped {@link Controller} in the underlying metadata repository.
*
* @return the scope
*/
ScopeKey getInstallScope();
/**
- * Set the install scope
+ * Get the install scope. If a scoped {@link Controller} (i.e. a child of the main {@link Controller})
+ * was used, by annotating the {@link ControllerContext} with annotations annotated with {@link ScopeFactoryLookup}
+ * this is the location of the scoped {@link Controller} in the underlying metadata repository. This method should
+ * only be called by the {@link Controller}.
+ *
*
* @param key the scope key
*/
More information about the jboss-cvs-commits
mailing list