code: public static Connection connect(String url) throws IOException, InterruptedException {
          Options options = new Options.Builder().server(url).build();
          return createConnection(options, false);
      }
docs: The Java client generally expects URLs of the form {@code nats://hostname:port}
  
  <p>but also allows urls with a user password {@code nats://user:pass@hostname:port}.
  
  <p>or token in them {@code nats://token@hostname:port}.
  
  <p>Moreover, you can initiate a TLS connection, by using the `tls`
  schema, which will use the default SSLContext, or fail if one is not set. For
  testing and development, the `opentls` schema is support when the server is
  in non-verify mode. In this case, the client will accept any server
  certificate and will not provide one of its own.
  
  <p>This is a synchronous call, and the connection should be ready for use on return
  there are network timing issues that could result in a successful connect call but
  the connection is invalid soon after return, where soon is in the network/thread world.
  
  <p>If the connection fails, an IOException is thrown
  
  @param url the url of the server, ie. nats://localhost:4222
  @throws IOException if a networking issue occurs
  @throws InterruptedException if the current thread is interrupted
  @return the connection