Return-Path: Delivered-To: apmail-avalon-dev-archive@www.apache.org Received: (qmail 62680 invoked from network); 9 Oct 2003 13:05:39 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 9 Oct 2003 13:05:39 -0000 Received: (qmail 53140 invoked by uid 500); 9 Oct 2003 13:05:34 -0000 Delivered-To: apmail-avalon-dev-archive@avalon.apache.org Received: (qmail 53108 invoked by uid 500); 9 Oct 2003 13:05:33 -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 53089 invoked from network); 9 Oct 2003 13:05:33 -0000 Received: from unknown (HELO onramp.i95.net) (205.177.132.17) by daedalus.apache.org with SMTP; 9 Oct 2003 13:05:33 -0000 Received: from apache.org ([66.208.12.130]) by onramp.i95.net (8.12.10/8.12.9) with ESMTP id h99D5Xk6011655 for ; Thu, 9 Oct 2003 09:05:33 -0400 Message-ID: <3F855D1D.6080608@apache.org> Date: Thu, 09 Oct 2003 09:05:33 -0400 From: Berin Loritsch User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Avalon Developers List Subject: Re: Startable doesn't has a isRunning() interface ? References: <026001c38dba$b23447b0$0600005a@adsnm.com> <028301c38dcd$e58497b0$0600005a@adsnm.com> In-Reply-To: <028301c38dcd$e58497b0$0600005a@adsnm.com> 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 X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Jonathan Hawkes wrote: > In the current specification, it is fairly straightforward to implement an > Avalon container. When would you suggest the container poll this new > isRunning method? It would be preferable to have the component notify the > container if it shut itself down. However, then you run the risk of > perverting IOC. Not necessarily. As an example, I will use Swing components. Each Swing component has a number of listeners available for it. The Swing component doesn't know or care what objects are listening, all it does is send events to the listener. Therefore, if the component has an add/remove RuntimeListener or some such animal, the container could register itself as a listener and receive a RuntimeEvent for each change in state. Alternatively, it might register a controlled part of itself for that purpose. The thing is that the IOC is not inverted, and proper separation is still maintained. It works, but the whole Listener maintenance code can be a PITA to force component writers to implement. For that purpose an Abstract Class would be helpful. -- "They that give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." - Benjamin Franklin --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org For additional commands, e-mail: dev-help@avalon.apache.org