Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 98B937942 for ; Tue, 9 Aug 2011 14:44:52 +0000 (UTC) Received: (qmail 41873 invoked by uid 500); 9 Aug 2011 14:44:51 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 41752 invoked by uid 500); 9 Aug 2011 14:44:50 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 41739 invoked by uid 99); 9 Aug 2011 14:44:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2011 14:44:50 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ole.ersoy@gmail.com designates 209.85.220.171 as permitted sender) Received: from [209.85.220.171] (HELO mail-vx0-f171.google.com) (209.85.220.171) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2011 14:44:42 +0000 Received: by vxh13 with SMTP id 13so46905vxh.30 for ; Tue, 09 Aug 2011 07:44:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=BChc94/5KBSGciuljWbTQ9QhN7yYBUdfBu2zj43eQ1Y=; b=H8gDn2BVwxog9Me5yWb9UOpE/xoBNSnEUS1NE/AMyhW2wQb6gFx424yT8hbZp8mbWh WynGBeHLfDjZXD9jkcEq6+Zf5J+MdRBWZPGoEnHZ+XNHvOpciM3YpV59wKSGsGUPgutp S/EFwciut9ecrSqDOwpZf1lVvk4Li92TWOEgE= Received: by 10.52.100.200 with SMTP id fa8mr7305996vdb.129.1312901061027; Tue, 09 Aug 2011 07:44:21 -0700 (PDT) Received: from ole.pyramidetechnologies.com (c-71-57-50-223.hsd1.il.comcast.net [71.57.50.223]) by mx.google.com with ESMTPS id k10sm1189917vdi.31.2011.08.09.07.44.18 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 09 Aug 2011 07:44:19 -0700 (PDT) Message-ID: <4E4147BF.6050608@gmail.com> Date: Tue, 09 Aug 2011 09:44:15 -0500 From: Ole Ersoy User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100907 Fedora/3.0.7-1.fc12 Thunderbird/3.0.7 MIME-Version: 1.0 To: Commons Developers List Subject: Re: [math] Monitoring iterative algorithms References: <4E4049F2.3040109@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit One approach that will minimize the burden on commons math developers is to point users to an AspectJ approach as is discussed here: http://www.ibm.com/developerworks/java/library/j-aopwork6/index.html The article starts out with a discussion of how to implement the observer design pattern the classic way, along with the associated design and maintenance costs, and then explains how to do it with AspectJ which leaves the class of the objects being observed in its original form. Cheers, - Ole On 08/09/2011 12:46 AM, S�bastien Brisard wrote: > 2011/8/8 Phil Steitz: >> >> +1 to the idea of using the Observer pattern; but -0 for >> Observable. I would favor defining Events and Listeners because a) >> Observable is concrete, so effectively forces you to create an >> Observable delegate >> > I'm not sure I understand. Components in java.awt also need to > implement quite a few methods like addListener, fireEvent, and so on. > Maybe we could write a DefaultObservable, which would implement most > of the methods required by Observable, and could be inherited by some > (probably not all, unfortunately) of the already implemented iterative > algorithms ? >> >> and b) the interface is crude and is really >> designed for GUI scenarios where observers are holding references to >> the Observable and just being notified that something has changed. >> Events are more flexible and can be implemented using interfaces. >> Has anyone ever actually used Observable outside of a GUI m/v >> environment? Does anyone know of event frameworks suitable for >> monitoring long-running computations that we might adapt? >> >> In any case, I think it is a good idea to develop an event framework >> for [math]. We should probably also think about doing this in a way >> that is at least JMX-friendly. >> >> Phil >> > Browsing through the JavaDoc, I realized that o.a.c.m.ode has some > event handling facilities. Is the implementer still around? > Sebastien > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org