commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rsi...@apache.org
Subject cvs commit: jakarta-commons/discovery TODO
Date Mon, 26 Aug 2002 20:12:21 GMT
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:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message