// Path: jetty-console-api/src/main/java/org/simplericity/jettyconsole/api/Configuration.java
// public interface Configuration {
// 
//     boolean isHeadless();
// 
//     void setHeadless(boolean headless);
// 
//     String getContextPath();
// 
//     void setContextPath(String contextPath);
// }
// 
// Path: jetty-console-api/src/main/java/org/simplericity/jettyconsole/api/JettyConsolePlugin.java
// public interface JettyConsolePlugin {
//     
//      List<StartOption> getStartOptions();
//      void beforeStart(WebAppContext context);
//      void beforeStop(WebAppContext context);
// 
//      void customizeServer(Server server);
// 
//      void customizeConnector(ServerConnector connector);
// 
//      void bootstrap();
// 
//      void configureConsole(Configuration configuration);
// }


import org.eclipse.jetty.annotations.AnnotationConfiguration;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.plus.webapp.EnvConfiguration;
import org.eclipse.jetty.server.*;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.server.handler.HandlerCollection;
import org.eclipse.jetty.webapp.*;
import org.kantega.jexmec.PluginManager;
import org.simplericity.jettyconsole.api.Configuration;
import org.simplericity.jettyconsole.api.JettyConsolePlugin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
/*
 * Copyright 2015 Eirik Bjørsnøs
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.simplericity.jettyconsole;




public class DefaultJettyManager implements JettyManager {

    private Server server;
    private Logger log = LoggerFactory.getLogger(getClass());
    private Properties settings;
    private String name;
    private Runnable shutdownHook;
    private List<JettyListener> listenerList = new ArrayList<JettyListener>();
// Path: jetty-console-api/src/main/java/org/simplericity/jettyconsole/api/Configuration.java
// public interface Configuration {
// 
//     boolean isHeadless();
// 
//     void setHeadless(boolean headless);
// 
//     String getContextPath();
// 
//     void setContextPath(String contextPath);
// }
// 
// Path: jetty-console-api/src/main/java/org/simplericity/jettyconsole/api/JettyConsolePlugin.java
// public interface JettyConsolePlugin {
//     
//      List<StartOption> getStartOptions();
//      void beforeStart(WebAppContext context);
//      void beforeStop(WebAppContext context);
// 
//      void customizeServer(Server server);
// 
//      void customizeConnector(ServerConnector connector);
// 
//      void bootstrap();
// 
//      void configureConsole(Configuration configuration);
// }


// Path: jetty-console-core/src/main/java/org/simplericity/jettyconsole/DefaultJettyManager.java
import org.eclipse.jetty.annotations.AnnotationConfiguration;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.plus.webapp.EnvConfiguration;
import org.eclipse.jetty.server.*;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.server.handler.HandlerCollection;
import org.eclipse.jetty.webapp.*;
import org.kantega.jexmec.PluginManager;
import org.simplericity.jettyconsole.api.Configuration;
import org.simplericity.jettyconsole.api.JettyConsolePlugin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;

/*
 * Copyright 2015 Eirik Bjørsnøs
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.simplericity.jettyconsole;




public class DefaultJettyManager implements JettyManager {

    private Server server;
    private Logger log = LoggerFactory.getLogger(getClass());
    private Properties settings;
    private String name;
    private Runnable shutdownHook;
    private List<JettyListener> listenerList = new ArrayList<JettyListener>();
    private PluginManager<JettyConsolePlugin> pluginManager;