APISonar


io.confluent.kafka.schemaregistry.rest.SchemaRegistryConfig.HTTP

> io > confluent > kafka > schemaregistry > rest > SchemaRegistryConfig > HTTP
io APIs confluent APIs kafka APIs schemaregistry APIs rest APIs SchemaRegistryConfig APIs HTTP APIs

Example 1
public void testGetPortForIdentityMultipleListeners() throws SchemaRegistryException {
    List<String> listeners = new LinkedList<String>();
    listeners.add("http://localhost:123");
    listeners.add("http://localhost:456");

    KafkaSchemaRegistry.SchemeAndPort schemeAndPort =
        KafkaSchemaRegistry.getSchemeAndPortForIdentity(-1, listeners, SchemaRegistryConfig.HTTP);
    assertEquals("Expected first listener's port to be returned", 123, schemeAndPort.port);
    assertEquals("Expected Scheme match", SchemaRegistryConfig.HTTP, schemeAndPort.scheme);
  }
Example 2
public SchemaRegistryIdentity(
      @JsonProperty("host") String host,
      @JsonProperty("port") Integer port,
      @JsonProperty("master_eligibility") Boolean masterEligibility,
      @JsonProperty(value = "scheme", defaultValue = SchemaRegistryConfig.HTTP) String scheme
  ) {
    this.version = CURRENT_VERSION;
    this.host = host;
    this.port = port;
    this.masterEligibility = masterEligibility;
    this.scheme = scheme;
  }