code: public static ApplicationSession openApplication(String appName, String host, int port,
                                                       SSLTransportParameters sslParams,
                                                       Credentials credentials) {
          Utils.require(!Utils.isEmpty(appName), "appName");
          Utils.require(!Utils.isEmpty(host), "host");
  
          try (Client client = new Client(host, port, sslParams)) {
              client.setCredentials(credentials);
              ApplicationDefinition appDef = client.getAppDef(appName);
              Utils.require(appDef != null, "Unknown application: %s", appName);
              RESTClient restClient = new RESTClient(client.m_restClient);
              return openApplication(appDef, restClient);
          }
      }
docs: Create an {@link ApplicationSession} for the given application name on the Doradus
  server, creating a new connection the given REST API host, port, and TLS/SSL
  parameters. This static method allows an application session to be created without
  creating a Client object and then calling {@link #openApplication(String)}. If the
  given sslParams is null, an unsecured (HTTP) connectio is opened. Otherwise, a
  TLS/SSL connection is created using the given credentials. An exception is thrown
  if the given application is unknown or cannot be accessed or if a connection cannot
  be established. If successful, the session object will be specific to the type of
  application opened, and it will have its own REST session to the Doradus server.
  
  @param appName
  Name of an application to open.
  @param host
  REST API host name or IP address.
  @param port
  REST API port number.
  @param sslParams
  {@link SSLTransportParameters} object containing TLS/SSL parameters to
  use, or null to open an HTTP connection.
  @param credentials
  {@link Credentials} to use for all requests with the new application
  session. Can be null to use an unauthenticated session.
  @return {@link ApplicationSession}
  through which the application can be accessed.
  @see com.dell.doradus.client.OLAPSession
  @see com.dell.doradus.client.SpiderSession