Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 37080 invoked from network); 24 Sep 2005 13:11:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Sep 2005 13:11:16 -0000 Received: (qmail 70417 invoked by uid 500); 24 Sep 2005 13:11:13 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 70384 invoked by uid 500); 24 Sep 2005 13:11:12 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 70371 invoked by uid 99); 24 Sep 2005 13:11:12 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Sep 2005 06:11:12 -0700 X-ASF-Spam-Status: No, hits=1.9 required=10.0 tests=RCVD_BY_IP,RCVD_IN_BL_SPAMCOP_NET,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jerome.lacoste@gmail.com designates 72.14.204.196 as permitted sender) Received: from [72.14.204.196] (HELO qproxy.gmail.com) (72.14.204.196) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Sep 2005 06:11:19 -0700 Received: by qproxy.gmail.com with SMTP id p26so288301qbb for ; Sat, 24 Sep 2005 06:10:49 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=M4D0yii0nN0Fu+3EYltYuKvFOerVO6J1dcoqtXK6Du4FSf4sdPYLqjRmP3JFGQ6gxTGCTdUDJnrP9D/M0GMvzljmfqG4aOUeSyEd7EGtc9wPCFRGyI8r/+xSszilOOUJgg6FpTyoVCFdHeIa4Lm6Xw/TjJAQQmxWNW76uxhz0/A= Received: by 10.65.22.16 with SMTP id z16mr314587qbi; Sat, 24 Sep 2005 06:10:49 -0700 (PDT) Received: by 10.65.11.9 with HTTP; Sat, 24 Sep 2005 06:10:49 -0700 (PDT) Message-ID: <5a2cf1f60509240610781d5190@mail.gmail.com> Date: Sat, 24 Sep 2005 15:10:49 +0200 From: jerome lacoste Reply-To: jerome lacoste To: commons-dev@jakarta.apache.org Subject: Re: [exec] API, implementation various notes In-Reply-To: <5a2cf1f605092305314ba4a139@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <5a2cf1f605092303325075fc39@mail.gmail.com> <5a2cf1f605092305314ba4a139@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N > Proposal > -------- > > to me commons-exec is slightly over-engineered. As is, clients will > have to resort to strange things and rewrite somewhat complex helper > classes to do simple things. > > I propose to change the API. > > Vision: Make commons-exec a reusable Library that is available to all > SDK, that not only solves the problems solved by ProcessBuilder but > also add functionality for Process and Stream management, allowing > flexible reuse of this functionality. [blablabla...] better to show code than words? I started refactoring the API to something that fits better the vision I have with this library. I would appreciate if you could review some of the design ideas I put in this refactoring. I can then write & send patches to migrate from the original version to something we agree with. Here's a list of some of the things I did or plan to do in this refactoring= : DONE Renamed environment package to os Moved OS into os package Made Environment simpler Made Environment a real Map Made Environment values the String value and not EnvironmentVariable inst= ances Moved getProcEnvironment in separate ProcEnvironment class Renamed getProcEnvironment to getenv() Made CommandLauncher use Map instead of Environment -> moved conversion of Environment to Map inside abstract command launcher class (for now) Introduced ProcessLauncher (our ProcessBuilder for SDK < 5.0) Made Execute delegate to ProcessLauncher Made Execute and Exec use Map instead of Environment in their API Merged ProcessDestroyer and Watchdog behind a unique Execute.Listener inter= face TODO: - finish Execute - look at Exec - look at stream management - implement support for SDK 5.0 - constants The files can be viewed at: http://moca.dynalias.com/~jerome/projects/exec2/ Cheers, Jerome PS: first time I participate in the commons project, so let me know if there's something I don't do right. --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org