ManyRequests.java 文件源码

java
阅读 27 收藏 0 点赞 0 评论 0

项目:openjdk9 作者:
public static void main(String[] args) throws Exception {
    Logger logger = Logger.getLogger("com.sun.net.httpserver");
    logger.setLevel(Level.ALL);
    logger.info("TEST");

    SSLContext ctx = new SimpleSSLContext().get();

    InetSocketAddress addr = new InetSocketAddress(0);
    HttpsServer server = HttpsServer.create(addr, 0);
    server.setHttpsConfigurator(new Configurator(ctx));

    HttpClient client = HttpClient.create()
                                  .sslContext(ctx)
                                  .build();
    try {
        test(server, client);
        System.out.println("OK");
    } finally {
        server.stop(0);
        client.executorService().shutdownNow();
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号