public Socket connect()

in alloydb-jdbc-connector/src/main/java/com/google/cloud/alloydb/InternalConnectorRegistry.java [96:115]


  public Socket connect(ConnectionConfig config) throws IOException {
    synchronized (shutdownGuard) {
      if (shutdown) {
        throw new IllegalStateException("ConnectorRegistry was shut down.");
      }
    }

    if (config.getNamedConnector() != null) {
      Connector connector = getNamedConnector(config.getNamedConnector());
      return connector.connect(config.withConnectorConfig(connector.getConfig()));
    }

    // Validate parameters
    Preconditions.checkArgument(
        config.getInstanceName() != null,
        "alloydbInstance property not set. Please specify this property in the JDBC URL or the "
            + "connection Properties");

    return getConnector(config).connect(config);
  }