@Override public void start() { delegate.start(); handler.onServerStart(); }
httpsServer.createContext("/", handler); httpsServer.setExecutor(new ThreadPoolExecutor(1, 1, 10, TimeUnit.SECONDS, new LinkedBlockingQueue<>())); httpsServer.start(); return httpsServer;
SSLContext ssl = SSLContext.getInstance("TLS"); KeyManagerFactory keyFactory = KeyManagerFactory .getInstance(KeyManagerFactory.getDefaultAlgorithm()); KeyStore store = KeyStore.getInstance("JKS"); store.load(new FileInputStream(keystoreFile),keyPass.toCharArray()); keyFactory.init(store, keyPass.toCharArray()); TrustManagerFactory trustFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); trustFactory.init(store); ssl.init(keyFactory.getKeyManagers(), trustFactory.getTrustManagers(), new SecureRandom()); HttpsConfigurator configurator = new HttpsConfigurator(ssl); HttpsServer httpsServer = HttpsServer.create(new InetSocketAddress(hostname, port), port); httpsServer.setHttpsConfigurator(configurator); HttpContext httpContext = httpsServer.createContext(uri); httpsServer.start(); endpoint.publish(httpContext);
@Override public void start() { delegate.start(); handler.onServerStart(); }
httpsServer.getAddress() ); httpsServer.start();
protected HttpsServer createAndStartHttpsServer() throws Exception { HttpsServer httpsServer = ((LiveCasData) getTestData()).createSSLServer(); URL callbackUrl = new URL( GeoServerCasConstants.createProxyCallBackURl(proxyCallbackUrlPrefix.toString())); httpsServer.createContext(callbackUrl.getPath(), new HttpsProxyCallBackHandler()); httpsServer.createContext(createRequest("/j_spring_cas_security_check").getRequestURI(), new SingleSignOutHandler("/j_spring_cas_security_check")); httpsServer.createContext(createRequest("/wms").getRequestURI(), new SingleSignOutHandler( "/wms")); httpsServer.start(); return httpsServer; }