public void start() throws InterruptedException {
        // Configure SSL.
        final HTTPDynamicSslContext sslCtx;
        if (config.isSslEnabled()) {
            sslCtx = HTTPDynamicSslContext.forServer(config.getSslKeyPath(), config.getSslCertChainPath());
        } else {
            sslCtx = null;
        }

        // Configure the server.
        ThreadFactory tf = new ThreadFactoryBuilder().setDaemon(true).build();
        EventLoopGroup bossGroup = new NioEventLoopGroup(1, tf);
        EventLoopGroup workerGroup = new NioEventLoopGroup(0, tf);
        ServerBootstrap b = new ServerBootstrap();
        b.group(bossGroup, workerGroup)
            .channel(NioServerSocketChannel.class)
            .handler(new LoggingHandler(LogLevel.INFO))
            .childHandler(new HttpServerInitializer(sslCtx));

        b.bind(config.getHost(), config.getPort()).sync();
        Optional.ofNullable(sslCtx).ifPresent(HTTPDynamicSslContext::start);

        log.info("Prometheus exporter endpoint:" +
            (config.isSslEnabled() ? "https" : "http") + "://" + config.getHost() + ":" + config.getPort() + '/');
    }
An HTTP server that sends back the content of the received HTTP request
in a pretty plaintext form.
oap-server/server-telemetry/telemetry-prometheus/src/main/java/org/apache/skywalking/oap/server/telemetry/prometheus/httpserver/HttpServer.java