Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 3567 invoked from network); 26 Aug 2002 20:12:27 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 26 Aug 2002 20:12:27 -0000 Received: (qmail 28254 invoked by uid 97); 26 Aug 2002 20:12:59 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 28214 invoked by uid 97); 26 Aug 2002 20:12:58 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: 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 28195 invoked by uid 97); 26 Aug 2002 20:12:58 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Date: 26 Aug 2002 20:12:21 -0000 Message-ID: <20020826201221.1498.qmail@icarus.apache.org> From: rsitze@apache.org To: jakarta-commons-cvs@apache.org Subject: cvs commit: jakarta-commons/discovery TODO X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N rsitze 2002/08/26 13:12:20 Modified: discovery/src/java/org/apache/commons/discovery ClassInfo.java ResourceInfo.java ServiceDiscovery.java discovery TODO Added: discovery/src/java/org/apache/commons/discovery ServiceInfo.java Log: ServiceInfo & ServiceDiscovery extends ClassDiscovery Revision Changes Path 1.3 +5 -8 jakarta-commons/discovery/src/java/org/apache/commons/discovery/ClassInfo.java Index: ClassInfo.java =================================================================== RCS file: /home/cvs/jakarta-commons/discovery/src/java/org/apache/commons/discovery/ClassInfo.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ClassInfo.java 26 Aug 2002 13:08:46 -0000 1.2 +++ ClassInfo.java 26 Aug 2002 20:12:20 -0000 1.3 @@ -73,8 +73,9 @@ public class ClassInfo extends ResourceInfo { private static Log log = DiscoveryLogFactory.newLog(ClassInfo.class); - - private static final boolean debug = false; + public static void setLog(Log _log) { + log = _log; + } protected Class resourceClass; @@ -118,7 +119,7 @@ this.resourceClass = resourceClass; } - public ClassInfo toClassInfo(ResourceInfo resourceInfo) { + public static ClassInfo toClassInfo(ResourceInfo resourceInfo) { if (resourceInfo instanceof ClassInfo) { return (ClassInfo)resourceInfo; } else { @@ -127,10 +128,6 @@ } public String toString() { - return "ClassResource " + resourceName + " " + loader + " " + location; - } - - public static void setLog(Log _log) { - log = _log; + return "ClassInfo[" + resourceName + ", " + loader + ", " + location + "]"; } } 1.5 +1 -1 jakarta-commons/discovery/src/java/org/apache/commons/discovery/ResourceInfo.java Index: ResourceInfo.java =================================================================== RCS file: /home/cvs/jakarta-commons/discovery/src/java/org/apache/commons/discovery/ResourceInfo.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ResourceInfo.java 23 Aug 2002 21:56:09 -0000 1.4 +++ ResourceInfo.java 26 Aug 2002 20:12:20 -0000 1.5 @@ -134,7 +134,7 @@ } public String toString() { - return "Resource " + resourceName + " " + loader + " " + location; + return "ResourceInfo[" + resourceName + ", " + loader + ", " + location + "]"; } public static ResourceInfo[] toArray(Enumeration enum) { 1.10 +6 -6 jakarta-commons/discovery/src/java/org/apache/commons/discovery/ServiceDiscovery.java Index: ServiceDiscovery.java =================================================================== RCS file: /home/cvs/jakarta-commons/discovery/src/java/org/apache/commons/discovery/ServiceDiscovery.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- ServiceDiscovery.java 26 Aug 2002 13:08:46 -0000 1.9 +++ ServiceDiscovery.java 26 Aug 2002 20:12:20 -0000 1.10 @@ -93,7 +93,7 @@ * @author Costin Manolache * @author James Strachan */ -public class ServiceDiscovery extends ResourceDiscovery +public class ServiceDiscovery extends ClassDiscovery { private static Log log = DiscoveryLogFactory.newLog(ServiceDiscovery.class); @@ -116,7 +116,7 @@ * a) it preserves the desired behaviour * b) it defers file I/O and class loader lookup until necessary. * - * @return Enumeration of ClassInfo + * @return Enumeration of ServiceInfo */ public Enumeration findResources(final String serviceName) { if (log.isDebugEnabled()) @@ -132,7 +132,7 @@ private int idx = 0; private Vector classNames = null; private Enumeration classResources = null; - private ClassInfo resource = null; + private ServiceInfo resource = null; public boolean hasMoreElements() { if (resource == null) { @@ -147,7 +147,7 @@ return element; } - private ClassInfo getNextService() { + private ServiceInfo getNextService() { if (classResources == null || !classResources.hasMoreElements()) { classResources = getNextClassResources(); if (classResources == null) { @@ -155,9 +155,9 @@ } } - ClassInfo classInfo = (ClassInfo)classResources.nextElement(); + ServiceInfo serviceInfo = ServiceInfo.toServiceInfo((ClassInfo)classResources.nextElement()); - return classInfo; + return serviceInfo; } private Enumeration getNextClassResources() { 1.3 +22 -64 jakarta-commons/discovery/src/java/org/apache/commons/discovery/ServiceInfo.java 1.6 +4 -2 jakarta-commons/discovery/TODO Index: TODO =================================================================== RCS file: /home/cvs/jakarta-commons/discovery/TODO,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- TODO 26 Aug 2002 13:21:41 -0000 1.5 +++ TODO 26 Aug 2002 20:12:20 -0000 1.6 @@ -1,7 +1,9 @@ -1. Jakarta Web site for commons subproject +1. Jakarta Web site for commons subproject 2. Review/rewrite javadoc 3. Review/rework best-practices.html -4. \ No newline at end of file +4. NLS enable + +5. Create a finer granularity of exceptions.. we only have one for all situations. -- To unsubscribe, e-mail: For additional commands, e-mail: