docs: public static void main(String[] args) throws IOException, InterruptedException {
      // Add final keyword to pass checkStyle.
      final int serverPort = getPortOrDefaultFromArgs(args, 0, 50051);
      final String cloudProjectId = getStringOrDefaultFromArgs(args, 1, null);
      final int zPagePort = getPortOrDefaultFromArgs(args, 2, 3000);
      final int prometheusPort = getPortOrDefaultFromArgs(args, 3, 9090);
  
      // Registers all RPC views. For demonstration all views are registered. You may want to
      // start with registering basic views and register other views as needed for your application.
      RpcViews.registerAllViews();
  
      // Registers logging trace exporter.
      LoggingTraceExporter.register();
  
      // Starts a HTTP server and registers all Zpages to it.
      ZPageHandlers.startHttpServerAndRegisterAll(zPagePort);
      logger.info("ZPages server starts at localhost:" + zPagePort);
  
      // Registers Stackdriver exporters.
      if (cloudProjectId != null) {
        StackdriverTraceExporter.createAndRegister(
            StackdriverTraceConfiguration.builder().setProjectId(cloudProjectId).build());
        StackdriverStatsExporter.createAndRegister(
            StackdriverStatsConfiguration.builder()
                .setProjectId(cloudProjectId)
                .setExportInterval(Duration.create(60, 0))
                .build());
      }
  
      // Register Prometheus exporters and export metrics to a Prometheus HTTPServer.
      PrometheusStatsCollector.createAndRegister();
      HTTPServer prometheusServer = new HTTPServer(prometheusPort, true);
  
      // Start the RPC server. You shouldn't see any output from gRPC before this.
      logger.info("gRPC starting.");
      final HelloWorldServer server = new HelloWorldServer(serverPort);
      server.start();
      server.blockUntilShutdown();
    }