code: public void run(InetSocketAddress address, boolean useTls) throws Exception {
      // important to enable HTTP/2 in ActorSystem's config
  
      Config conf = ConfigFactory.parseString("akka.http.server.preview.enable-http2 = on")
          .withFallback(ConfigFactory.defaultApplication());
  
      system = ActorSystem.create("AsyncServer", conf);
  
      Materializer mat = ActorMaterializer.create(system);
  
      benchmarkService = new BenchmarkServiceImpl(mat);
  
      if (useTls) {
        Http.get(system).bindAndHandleAsync(
          BenchmarkServiceHandlerFactory.create(benchmarkService, mat, system),
          ConnectWithHttps.toHostHttps(address.getHostName(), address.getPort()).withCustomHttpsContext(Utils.serverHttpContext()),
          mat)
          .thenAccept(binding -> {
            System.out.println("gRPC server bound to: https://" + address);
          });
      } else {
        Http.get(system).bindAndHandleAsync(
          BenchmarkServiceHandlerFactory.create(benchmarkService, mat, system),
          ConnectHttp.toHost(address.getHostName(), address.getPort(), UseHttp2.always()),
          mat
          ).thenAccept(binding -> {
          System.out.println("gRPC server bound to: http://" + address);
        });
      }
    }
docs: Equivalent of "main", but non-static.