`
rieei
  • 浏览: 71578 次
  • 性别: Icon_minigender_2
  • 来自: 大连
社区版块
存档分类
最新评论

Endpoint https

 
阅读更多
SSLContext ssl = xxx;
HttpsConfigurator configurator = new HttpsConfigurator(ssl);
// 设置发布路径等
httpsServer = HttpsServer.create(new InetSocketAddress("127.0.0.1", 8080),200);
httpsServer.setHttpsConfigurator(configurator);
HttpContext httpContext = httpsServer.createContext("/test");
ExecutorService threads = Executors.newFixedThreadPool(200);
httpsServer.setExecutor(threads);
httpsServer.start();
// 发布
endPoint = Endpoint.create(new CVReceive());
endPoint.publish(httpContext);
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics