APISonar


org.apache.gobblin.r2.R2ClientFactory.Schema.HTTP

> org > apache > gobblin > r2 > R2ClientFactory > Schema > HTTP
org APIs apache APIs gobblin APIs r2 APIs R2ClientFactory APIs Schema APIs HTTP APIs

Example 1
protected R2Client createClient(Config config) {
    String urlTemplate = config.getString(HttpConstants.URL_TEMPLATE);

    // By default, use http schema
    R2ClientFactory.Schema schema = R2ClientFactory.Schema.HTTP;
    if (urlTemplate.startsWith(HttpConstants.SCHEMA_D2)) {
      schema = R2ClientFactory.Schema.D2;
    }

    R2ClientFactory factory = new R2ClientFactory(schema);
    Client client = factory.createInstance(config);
    return new R2Client(client, config, getBroker());
  }