// Path: jflask/src/main/java/net/jflask/RequestHandler.java
// public interface RequestHandler {
//   App getApp();
// 
//   HttpHandler asHttpHandler();
// }


import java.io.IOException;
import java.net.InetSocketAddress;
import java.util.Hashtable;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import com.sun.net.httpserver.HttpServer;
import net.jflask.RequestHandler;
package net.jflask.sun;



/**
 * Wrapper for the HTTP server embedded in the JDK. It may be shared by several
 * apps.
 *
 * @author pcdv
 * @see <a
 * href="http://docs.oracle.com/javase/7/docs/jre/api/net/httpserver/spec/com/sun/net/httpserver/package-summary.html">Documentation
 * for HTTPServer</a>
 */
public class WebServer {

  private HttpServer srv;

  private final ExecutorService pool;

  private InetSocketAddress address;

// Path: jflask/src/main/java/net/jflask/RequestHandler.java
// public interface RequestHandler {
//   App getApp();
// 
//   HttpHandler asHttpHandler();
// }


// Path: jflask/src/main/java/net/jflask/sun/WebServer.java
import java.io.IOException;
import java.net.InetSocketAddress;
import java.util.Hashtable;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import com.sun.net.httpserver.HttpServer;
import net.jflask.RequestHandler;

package net.jflask.sun;



/**
 * Wrapper for the HTTP server embedded in the JDK. It may be shared by several
 * apps.
 *
 * @author pcdv
 * @see <a
 * href="http://docs.oracle.com/javase/7/docs/jre/api/net/httpserver/spec/com/sun/net/httpserver/package-summary.html">Documentation
 * for HTTPServer</a>
 */
public class WebServer {

  private HttpServer srv;

  private final ExecutorService pool;

  private InetSocketAddress address;

  private final Map<String, RequestHandler> handlers = new Hashtable<>();