code: protected boolean initiateClient()
      {
          for (String host : hosts)
          {
              if (host == null || !StringUtils.isNumeric(port) || port.isEmpty())
              {
                  logger.error("Host or port should not be null / port should be numeric");
                  throw new IllegalArgumentException("Host or port should not be null / port should be numeric");
              }
  
              List<MongoCredential> credentials = MongoDBUtils.fetchCredentials(puMetadata.getProperties(),
                      externalProperties);
              ServerAddress addr;
              try
              {
                  addr = new ServerAddress(host, Integer.parseInt(port));
              }
              catch (NumberFormatException ex)
              {
                  throw new SchemaGenerationException(ex);
              }
  
              mongo = new MongoClient(addr, credentials);
              db = mongo.getDB(databaseName);
              return true;
          }
          return false;
      }
docs: initiate client method initiates the client.
  
  @return boolean value ie client started or not.