@Override public HttpContext createContext(final String s, final HttpHandler httpHandler) { return delegate.createContext(s, httpHandler); }
@Override public HttpContext createContext(final String s) { return delegate.createContext(s); }
httpsServer.createContext("/", handler); httpsServer.setExecutor(new ThreadPoolExecutor(1, 1, 10, TimeUnit.SECONDS, new LinkedBlockingQueue<>())); httpsServer.start();
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 HttpContext createContext(final String s, final HttpHandler httpHandler) { return delegate.createContext(s, httpHandler); }
@Override public HttpContext createContext(final String s) { return delegate.createContext(s); }
@Override public HttpContext createContext(String s, HttpHandler httpHandler) { return httpsServer.createContext(s, httpHandler); }
@Override public HttpContext createContext(String s) { return httpsServer.createContext(s); }
httpsServer.getAddress() ); return httpsServer.createContext( path, handler );
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; }
httpsServer.createContext("/test", new HttpHandler() { @Override public void handle(HttpExchange t) throws IOException {
server.createContext("/", new HttpHandler() { @Override public void handle(HttpExchange httpExchange) throws IOException {