public void initializeGateway() {
    String version = Version.getVersion();
    String hash = Version.getSourceHash();

    monitor.info(() -> format("Running version %s. Source repository hash %s", version, hash));

    ApiMain apiMain = new ApiMain(monitor);

    try (InputStream stream =
        ApiMain.class.getClassLoader().getResourceAsStream("demo-selfsigned-keystore.jks")) {
      if (stream == null) {
        throw new IllegalArgumentException("Demo keystore was not found");
      }

      // initialise the keystore
      char[] password = "password".toCharArray();
      KeyStore keyStore = KeyStore.getInstance("JKS");
      keyStore.load(stream, password);
      KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("SunX509");
      keyManagerFactory.init(keyStore, password);

      TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance("SunX509");
      trustManagerFactory.init(keyStore);

      apiMain.initializeHttps(trustManagerFactory, keyManagerFactory, keyStore);

      apiMain.start();

    } catch (Exception e) {
      errorCallback.accept(e);
    }
  }
Bootstraps all services (Gateway and 1..N Workers) in a single VM.

<p>Intended for demonstration purposes.
portability-bootstrap-vm/src/main/java/org/datatransferproject/bootstrap/vm/SingleVMMain.java