Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 84998 invoked from network); 15 Jun 2010 16:42:20 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Jun 2010 16:42:20 -0000 Received: (qmail 81234 invoked by uid 500); 15 Jun 2010 16:42:20 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 81169 invoked by uid 500); 15 Jun 2010 16:42:19 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 81160 invoked by uid 99); 15 Jun 2010 16:42:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jun 2010 16:42:19 +0000 X-ASF-Spam-Status: No, hits=2.3 required=10.0 tests=AWL,FREEMAIL_FROM,HTML_MESSAGE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of yanglang@gmail.com designates 74.125.82.49 as permitted sender) Received: from [74.125.82.49] (HELO mail-ww0-f49.google.com) (74.125.82.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jun 2010 16:42:13 +0000 Received: by wwb17 with SMTP id 17so1423767wwb.36 for ; Tue, 15 Jun 2010 09:41:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=YzK+xpm3K7lNaA2kxYSFVT4nzmdtqWJbdbtyZi+EgYw=; b=DOgRDnFV+T8mUF6INVpcpfgODpkYQ//XUnSpCihSRtfJzeiRmddLqIGEKoR82Fdcfh UPBA1/DMAXVldIB+WkgpBGozx5Wfq3TZEVwngBZoTz/TVNd49AhqfO1KX3f03gHiucTc zUTCFHpPGPhXXQW7I+4pzTUo8j8b1OQprypPY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=SQGgS/0635Ul1qUPdfjJxFQl2LmxU+gKkSplyRfVRw/3C8CiiJct5Y9JfKCedQXOD4 9s5sk/dTTGLtkmTX0/t0guDLQf/yWKAMDkVU4WQjEwywsJ+iWtsgFQC/1w+43uHs8zsH Za8d2pZv6PD6WAFUY444GfF9rPJOCaKZ9dGG8= MIME-Version: 1.0 Received: by 10.216.187.204 with SMTP id y54mr3958255wem.1.1276620109117; Tue, 15 Jun 2010 09:41:49 -0700 (PDT) Received: by 10.216.1.77 with HTTP; Tue, 15 Jun 2010 09:41:48 -0700 (PDT) In-Reply-To: <4C17A9C8.4040102@gmail.com> References: <4C17A9C8.4040102@gmail.com> Date: Tue, 15 Jun 2010 12:41:48 -0400 Message-ID: Subject: Re: [classlib] Is anyone working on java.util.ServiceLoader From: Lang Yang To: dev@harmony.apache.org Content-Type: multipart/alternative; boundary=0016e6541d6c1e21bf04891448f7 --0016e6541d6c1e21bf04891448f7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, Jun 15, 2010 at 12:26 PM, Tim Ellison wrote= : > On 15/Jun/2010 16:38, Lang Yang wrote: > > Hello guys, > > > > I was trying to implement > > javax.imageio.spi.ServiceRegistry.lookupProviders(Class) method (logged > as > > HARMONY-6553 [0]). What this method does is parse the service > > provider-configuration file to get a set of service provider=E2=80=99s = class > name, > > and instantiate them.[1] > > > > Alexei has found a really interesting documentation that shows Java 6 h= as > > introduced a new class, java.util.ServiceLoader [2], a simple > > service-provider loading facility. It can do everything that > > lookupProviders(Class) needs to do, so we were thinking maybe we can > re-use > > this class? We found out later that this class is not implemented right > now. > > Is anyone working on this? Do we have any plan on this? > > Maybe you are looking in the wrong place? I see code for > java.util.ServiceLoader on the Java 6 stream here > > > http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classli= b/modules/luni/src/main/java/java/util/ServiceLoader.java?view=3Dco > Thanks, I found it now. I was looking in the trunk. There is another question, how to re-use this class in Java 5 impl? Copy it class to ServiceRegistry class and make it private? > > Regards, > Tim > > > Thanks, > > > > Lang > > > > [0] https://issues.apache.org/jira/browse/HARMONY-6553 > > [1] > > > http://java.sun.com/j2se/1.4.2/docs/api/javax/imageio/spi/ServiceRegistry= .html#lookupProviders%28java.lang.Class%29 > > [2] http://java.sun.com/javase/6/docs/api/java/util/ServiceLoader.html > > > --0016e6541d6c1e21bf04891448f7--