You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Berin Loritsch <bl...@apache.org> on 2003/03/24 15:25:39 UTC

Re: cvs commit: avalon/src/java/org/apache/avalon/framework/container ContainerUtil.java

donaldp@apache.org wrote:

 > 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



I wan't aware we as a community made this an official lifecycle
method.  We need to keep Framework as stable as possible.

I believe the last discussion on this ended with the conclusion
that Runnable/Executable are *not* lifecycle methods, so therefore
putting this support in ContainerUtil would be sending the wrong
message.


 >   +
 >   +    /**
 >   +     * Execute the specified object if it implements the
 >   +     * {@link 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: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: cvs commit: avalon/src/java/org/apache/avalon/framework/container ContainerUtil.java

Posted by Leo Simons <le...@apache.org>.
Berin Loritsch wrote:
> donaldp@apache.org wrote:
> 
>  > 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
> 
> I believe the last discussion on this ended with the conclusion
> that Runnable/Executable are *not* lifecycle methods, so therefore
> putting this support in ContainerUtil would be sending the wrong
> message.

Hi Berin,

/**
  * The Executable can be implemented by components that need to perform
  * some work. In many respects it is similar to Runnable except that it
  * also allows an application to throw a non-Runtime Exception.
  *
  * <p>The work done may be short lived (ie a simple task) or it could
  * be a long running.</p>
  *
  * @author <a href="mailto:dev@avalon.apache.org">Avalon Development 
Team</a>
  * @version CVS $Revision: 1.13 $ $Date: 2003/02/11 15:58:38 $
  */

is the only docs available. Can't quite remember how the discussion went 
either; but the docs don't really reflect any conclusions; in fact there 
is not much said at all about executable!

- LSD



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org