avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/lifecycle LifecycleHelper.java
Date Sun, 23 Jun 2002 21:20:59 GMT
mcconnell    2002/06/23 14:20:59

  Modified:    containerkit/src/java/org/apache/excalibur/containerkit/kernel
                        AbstractServiceKernel.java
               containerkit/src/java/org/apache/excalibur/containerkit/lifecycle
                        LifecycleHelper.java
  Log:
  javadoc
  
  Revision  Changes    Path
  1.8       +19 -1     jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/kernel/AbstractServiceKernel.java
  
  Index: AbstractServiceKernel.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/kernel/AbstractServiceKernel.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- AbstractServiceKernel.java	23 Jun 2002 14:58:44 -0000	1.7
  +++ AbstractServiceKernel.java	23 Jun 2002 21:20:58 -0000	1.8
  @@ -82,6 +82,10 @@
           return lifecycleHelper;
       }
   
  +   /**
  +    * Request startup of all components.
  +    * @exception Exception if there is an error during startup
  +    */
       protected final void startupAllComponents()
           throws Exception
       {
  @@ -89,6 +93,10 @@
           processComponents( true, components );
       }
   
  +   /**
  +    * Request shutdown of all components.
  +    * @exception Exception if there is an error during shutdown
  +    */
       protected final void shutdownAllComponents()
           throws Exception
       {
  @@ -96,6 +104,11 @@
           processComponents( false, components );
       }
   
  +   /**
  +    * Request startup of a named component.
  +    * @param name the name of the component to startup
  +    * @exception Exception if there is an error during component startup
  +    */
       protected final void startupComponent( final String name )
           throws Exception
       {
  @@ -105,6 +118,11 @@
           processComponents( true, components );
       }
   
  +   /**
  +    * Request shutdown of a named component.
  +    * @param name the name of the component to shutdown
  +    * @exception Exception if there is an error during component shutdown
  +    */
       protected final void shutdownComponent( final String name )
           throws Exception
       {
  
  
  
  1.9       +15 -21    jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/lifecycle/LifecycleHelper.java
  
  Index: LifecycleHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/lifecycle/LifecycleHelper.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- LifecycleHelper.java	18 Jun 2002 03:47:14 -0000	1.8
  +++ LifecycleHelper.java	23 Jun 2002 21:20:59 -0000	1.9
  @@ -28,12 +28,12 @@
   import org.apache.avalon.framework.service.Serviceable;
   
   /**
  - * This is a class to help an Application manage lifecycle of
  - * <code>Blocks</code> and <code>BlockListeners</code>. The
  - * class will run each individual Entry through each lifecycle stage,
  - * and manage erros in a consistent way.
  + * This is a class to help an Application manage the lifecycle of a component.
  + * The implementation provides support for the processing of a component through
  + * each lifecycle stage, and manage errors in a consistent way.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  + * @author <a href="mailto:mcconnell@apache.org">Stephen McConnell</a>
    */
   public class LifecycleHelper
       extends AbstractLogEnabled
  @@ -55,18 +55,15 @@
       private static final int STAGE_DESTROY = 10;
   
       /**
  -     * Method to run a <code>Block</code> through it's startup phase.
  -     * This will involve notification of <code>BlockListener</code>
  -     * objects, creation of the Block/Block Proxy object, calling the startup
  -     * Avalon Lifecycle methods and updating State property of BlockEntry.
  -     * Errors that occur during shutdown will be logged appropriately and
  +     * Method to run a component through it's startup phase.
  +     * Errors that occur during startup will be logged appropriately and
        * cause exceptions with useful messages to be raised.
        *
        * @param name the name of the component
        * @param entry the entry representing object
  -     * @param provider the resource supplier
  -     * @throws LifecycleException if an error occurs when block passes
  -     *            through a specific lifecycle stage
  +     * @param provider the resource provider
  +     * @throws LifecycleException if an error occurs when the component passes
  +     *     through a specific lifecycle stage
        */
       public Object startup( final String name,
                              final Object entry,
  @@ -165,10 +162,7 @@
       }
   
       /**
  -     * Method to run a <code>Block</code> through it's shutdown phase.
  -     * This will involve notification of <code>BlockListener</code>
  -     * objects, invalidating the proxy object, calling the shutdown
  -     * Avalon Lifecycle methods and updating State property of BlockEntry.
  +     * Method to run a component through it's shutdown phase.
        * Errors that occur during shutdown will be logged appropraitely.
        *
        * @param name the name of the component
  @@ -227,8 +221,8 @@
       /**
        * Utility method to report that a lifecycle stage is about to be processed.
        *
  -     * @param name the name of block that caused failure
  -     * @param stage the stage
  +     * @param name the name of component that is the subject of the notice
  +     * @param stage the lifecycle processing stage
        */
       private void notice( final String name, final int stage )
       {
  @@ -246,8 +240,8 @@
        * Utility method to report that there was an error processing
        * specified lifecycle stage.
        *
  -     * @param name the name of block that caused failure
  -     * @param stage the stage
  +     * @param name the name of component that caused failure
  +     * @param stage the lefecycle stage
        * @param t the exception thrown
        */
       private void safeFail( final String name,
  @@ -266,7 +260,7 @@
   
       /**
        * Utility method to report that there was an error processing
  -     * specified lifecycle stage. It will also rethrow an exception
  +     * specified lifecycle stage. It will also re-throw an exception
        * with a better error message.
        *
        * @param name the name of block that caused failure
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message