AthenzJettyContainer { public void addServletHandlers(String serverHostName) { RewriteHandler rewriteHandler = new RewriteHandler(); boolean keepAlive = Boolean.parseBoolean(System.getProperty(AthenzConsts.ATHENZ_PROP_KEEP_ALIVE, "true")); if (!keepAlive) { HeaderPatternRule disableKeepAliveRule = new HeaderPatternRule(); disableKeepAliveRule.setPattern("servlet-api-[^/]*\\.jar$"); final String jettyHome = System.getProperty(AthenzConsts.ATHENZ_PROP_JETTY_HOME, getRootDir()); WebAppProvider webappProvider = new WebAppProvider(); webappProvider.setMonitoredDirName(jettyHome + "/webapps"); webappProvider.setScanInterval(60); webappProvider.setExtractWars(true); webappProvider.setConfigurationManager(new PropertiesConfigurationManager()); webappProvider.setParentLoaderPriority(true); setDefaultsDescriptor(webappProvider, jettyHome); final String jettyTemp = System.getProperty(AthenzConsts.ATHENZ_PROP_JETTY_TEMP, jettyHome + "/temp"); webappProvider.setTempDir(new File(jettyTemp)); deployer.addAppProvider(webappProvider); server.addBean(deployer); } AthenzJettyContainer(); static String getRootDir(); void addRequestLogHandler(); void addServletHandlers(String serverHostName); HttpConfiguration newHttpConfiguration(); void addHTTPConnectors(HttpConfiguration httpConfig, int httpPort, int httpsPort,
            int statusPort); void setBanner(String banner); void createServer(int maxThreads); static AthenzJettyContainer createJettyContainer(); void run(); void stop(); static void main(String [] args);  }
@Test public void testAddServletHandlers() { System.setProperty(AthenzConsts.ATHENZ_PROP_KEEP_ALIVE, "false"); AthenzJettyContainer container = new AthenzJettyContainer(); container.createServer(100); container.addServletHandlers("localhost"); }