Author: adrianc
Date: Tue Mar 22 15:20:23 2011
New Revision: 1084211
URL:
http://svn.apache.org/viewvc?rev=1084211&view=revLog:
StartupLoader.java JavaDocs - no functional change.
Modified:
ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupLoader.java
Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupLoader.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupLoader.java?rev=1084211&r1=1084210&r2=1084211&view=diff==============================================================================
--- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupLoader.java (original)
+++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupLoader.java Tue Mar 22 15:20:23 2011
@@ -19,30 +19,44 @@
package org.ofbiz.base.start;
/**
- * StartupLoader - Interface for loading server startup classes
- *
+ * An object that loads server startup classes.
+ * <p>
+ * When OFBiz starts, the main thread will create the <code>StartupLoader</code> instance and
+ * then call the loader's <code>load</code> method. If the method returns without
+ * throwing an exception the loader will be added to a list of initialized loaders.
+ * After all instances have been created and initialized, the main thread will call the
+ * <code>start</code> method of each loader in the list. When OFBiz shuts down, a
+ * separate shutdown thread will call the <code>unload</code> method of each loader.
+ * Implementations should anticipate asynchronous calls to the methods by different
+ * threads.
+ * </p>
+ *
*/
public interface StartupLoader {
/**
- * Load a startup class
+ * Load a startup class.
*
- * @param config Startup config
- * @param args Input arguments
- * @throws StartupException
+ * @param config Startup config.
+ * @param args Command-line arguments.
+ * @throws StartupException If an error was encountered. Throwing this exception
+ * will halt loader loading, so it should be thrown only when OFBiz can't
+ * operate without it.
*/
public void load(Start.Config config, String args[]) throws StartupException;
/**
- * Start the startup class
- * @throws StartupException
+ * Start the startup class. This method must not block - implementations
+ * that require thread blocking must create a separate thread and then return.
+ *
+ * @throws StartupException If an error was encountered.
*/
public void start() throws StartupException;
/**
- * Stop the container
+ * Stop the startup class. This method must not block.
*
- * @throws StartupException
+ * @throws StartupException If an error was encountered.
*/
public void unload() throws StartupException;
}