Return-Path: Delivered-To: apmail-avalon-dev-archive@avalon.apache.org Received: (qmail 9661 invoked by uid 500); 24 Mar 2003 14:25:41 -0000 Mailing-List: contact dev-help@avalon.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon Developers List" Reply-To: "Avalon Developers List" Delivered-To: mailing list dev@avalon.apache.org Received: (qmail 9636 invoked from network); 24 Mar 2003 14:25:40 -0000 Received: from www1.kc.aoindustries.com (209.15.201.70) by daedalus.apache.org with SMTP; 24 Mar 2003 14:25:40 -0000 Received: from apache.org ([66.208.12.130]) (authenticated) by www1.kc.aoindustries.com (8.11.6/8.11.6) with ESMTP id h2OEPfL25374; Mon, 24 Mar 2003 08:25:41 -0600 Message-ID: <3E7F1563.1080408@apache.org> Date: Mon, 24 Mar 2003 09:25:39 -0500 From: Berin Loritsch User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Avalon Developers List CC: avalon-cvs@apache.org Subject: Re: cvs commit: avalon/src/java/org/apache/avalon/framework/container ContainerUtil.java References: <20030324061549.15214.qmail@icarus.apache.org> In-Reply-To: <20030324061549.15214.qmail@icarus.apache.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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