geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: incubator-geronimo/modules/core/src/java/org/apache/geronimo/deployment/scanner DeploymentScanner.java
Date Sun, 17 Aug 2003 06:09:14 GMT
dain        2003/08/16 23:09:14

  Modified:    modules/core/src/java/org/apache/geronimo/deployment/scanner
                        DeploymentScanner.java
  Log:
  Added a constructor which takes a string encoded array of initial URLs to watch.
  
  Revision  Changes    Path
  1.8       +14 -1     incubator-geronimo/modules/core/src/java/org/apache/geronimo/deployment/scanner/DeploymentScanner.java
  
  Index: DeploymentScanner.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/deployment/scanner/DeploymentScanner.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DeploymentScanner.java	16 Aug 2003 23:16:30 -0000	1.7
  +++ DeploymentScanner.java	17 Aug 2003 06:09:14 -0000	1.8
  @@ -59,12 +59,15 @@
   import java.io.IOException;
   import java.net.MalformedURLException;
   import java.net.URL;
  +import java.net.URI;
  +import java.net.URISyntaxException;
   import java.util.HashMap;
   import java.util.HashSet;
   import java.util.Iterator;
   import java.util.Map;
   import java.util.Set;
   import java.util.Collections;
  +import java.util.StringTokenizer;
   import javax.management.MBeanRegistration;
   import javax.management.MBeanServer;
   import javax.management.ObjectName;
  @@ -89,6 +92,16 @@
       private long scanInterval;
       private boolean run;
       private Thread scanThread;
  +
  +    public DeploymentScanner() {
  +    }
  +
  +    public DeploymentScanner(String initialURLs, boolean recurse) throws MalformedURLException
{
  +        StringTokenizer tokenizer = new StringTokenizer(initialURLs, " \t\r\n,[]{}");
  +        while(tokenizer.hasMoreTokens()) {
  +            addURL(new URL(tokenizer.nextToken()), recurse);
  +        }
  +    }
   
       public ObjectName preRegister(MBeanServer server, ObjectName objectName) throws Exception
{
           relationService = JMXUtil.getRelationService(server);
  
  
  

Mime
View raw message