launcher/src/main/java/org/apidesign/bck2brwsr/launcher/Bck2BrwsrLauncher.java
branchdew
changeset 544 08ffdc3938e7
parent 543 1adce93fea0f
child 580 2f42cd9b5531
     1.1 --- a/launcher/src/main/java/org/apidesign/bck2brwsr/launcher/Bck2BrwsrLauncher.java	Wed Jan 23 12:53:23 2013 +0100
     1.2 +++ b/launcher/src/main/java/org/apidesign/bck2brwsr/launcher/Bck2BrwsrLauncher.java	Wed Jan 23 13:18:46 2013 +0100
     1.3 @@ -39,7 +39,6 @@
     1.4  import java.util.concurrent.TimeUnit;
     1.5  import java.util.logging.Level;
     1.6  import java.util.logging.Logger;
     1.7 -import org.apidesign.bck2brwsr.dew.Dew;
     1.8  import org.apidesign.vm4brwsr.Bck2Brwsr;
     1.9  import org.glassfish.grizzly.PortRange;
    1.10  import org.glassfish.grizzly.http.server.HttpHandler;
    1.11 @@ -58,7 +57,6 @@
    1.12      private static final Logger LOG = Logger.getLogger(Bck2BrwsrLauncher.class.getName());
    1.13      private static final MethodInvocation END = new MethodInvocation(null, null, null);
    1.14      private Set<ClassLoader> loaders = new LinkedHashSet<>();
    1.15 -    private Set<Bck2Brwsr.Resources> xRes = new LinkedHashSet<>();
    1.16      private BlockingQueue<MethodInvocation> methods = new LinkedBlockingQueue<>();
    1.17      private long timeOut;
    1.18      private final Res resources = new Res();
    1.19 @@ -104,17 +102,6 @@
    1.20              throw new IOException(ex);
    1.21          }
    1.22      }
    1.23 -    
    1.24 -    public static void main(String... args) throws Exception {
    1.25 -        Bck2BrwsrLauncher l = new Bck2BrwsrLauncher(null);
    1.26 -        l.addClassLoader(Bck2BrwsrLauncher.class.getClassLoader());
    1.27 -        HttpServer s = l.initServer();
    1.28 -        final Dew dew = new Dew();
    1.29 -        s.getServerConfiguration().addHttpHandler(dew, "/dew/");
    1.30 -        l.xRes.add(dew);
    1.31 -        l.launchServerAndBrwsr(s, "/dew/");
    1.32 -        System.in.read();
    1.33 -    }
    1.34  
    1.35      @Override
    1.36      public void initialize() throws IOException {
    1.37 @@ -376,12 +363,6 @@
    1.38                      return u.openStream();
    1.39                  }
    1.40              }
    1.41 -            for (Bck2Brwsr.Resources r : xRes) {
    1.42 -                InputStream is = r.get(resource);
    1.43 -                if (is != null) {
    1.44 -                    return is;
    1.45 -                }
    1.46 -            }
    1.47              throw new IOException("Can't find " + resource);
    1.48          }
    1.49      }