donaldp     2003/03/23 22:15:49

  Modified:    src/java/org/apache/avalon/framework/container
                        ContainerUtil.java
  Log:
  Add in utility method to Execute object
  
  Revision  Changes    Path
  1.14      +18 -1     
avalon/src/java/org/apache/avalon/framework/container/ContainerUtil.java
  
  Index: ContainerUtil.java
  ===================================================================
  RCS file: 
/home/cvs/avalon/src/java/org/apache/avalon/framework/container/ContainerUtil.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ContainerUtil.java        11 Feb 2003 15:58:40 -0000      1.13
  +++ ContainerUtil.java        24 Mar 2003 06:15:49 -0000      1.14
  @@ -57,6 +57,7 @@
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.activity.Startable;
  +import org.apache.avalon.framework.activity.Executable;
   import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.component.Composable;
  @@ -296,6 +297,22 @@
           if( object instanceof Startable )
           {
               ( (Startable)object ).start();
  +        }
  +    }
  +
  +    /**
  +     * Execute the specified object if it implements the
  +     * [EMAIL PROTECTED] Executable} interface.
  +     *
  +     * @param object the object to execute
  +     * @throws Exception if there is a problem executing object
  +     */
  +    public static void execute( final Object object )
  +        throws Exception
  +    {
  +        if( object instanceof Executable )
  +        {
  +            ( (Executable)object ).execute();
           }
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to