listener.setMaxThreads(getMaxThreads());
    protected HttpListener createListener(URL url) throws Exception {        if (!url.getProtocol().equals("http")) {            // TODO: handle https ?            throw new UnsupportedOperationException("Protocol " + url.getProtocol() + " is not supported");        }        SocketListener listener = new SocketListener();        listener.setHost(url.getHost());        listener.setPort(url.getPort());        server.addListener(listener);        listener.start();        return listener;    }