public class DefaultSchemaRegistryClient extends Object implements SchemaRegistryClient
| Constructor and Description |
|---|
DefaultSchemaRegistryClient() |
DefaultSchemaRegistryClient(org.springframework.web.client.RestTemplate restTemplate) |
| Modifier and Type | Method and Description |
|---|---|
String |
fetch(int id)
Retrieves a schema by its identifier.
|
String |
fetch(SchemaReference schemaReference)
Retrieves a schema by its reference (subject and version).
|
protected String |
getEndpoint() |
protected org.springframework.web.client.RestTemplate |
getRestTemplate() |
SchemaRegistrationResponse |
register(String subject,
String format,
String schema)
Registers a schema with the remote repository returning the unique identifier
associated with this schema.
|
void |
setEndpoint(String endpoint) |
public DefaultSchemaRegistryClient()
public DefaultSchemaRegistryClient(org.springframework.web.client.RestTemplate restTemplate)
protected String getEndpoint()
public void setEndpoint(String endpoint)
protected org.springframework.web.client.RestTemplate getRestTemplate()
public SchemaRegistrationResponse register(String subject, String format, String schema)
SchemaRegistryClientregister in interface SchemaRegistryClientsubject - the full name of the schemaschema - string representation of the schemaSchemaRegistrationResponse representing the result of the
operationpublic String fetch(SchemaReference schemaReference)
SchemaRegistryClientfetch in interface SchemaRegistryClientschemaReference - a SchemaReference used to identify the target
schema.public String fetch(int id)
SchemaRegistryClientfetch in interface SchemaRegistryClientid - the id of the target schema.Copyright © 2019 Pivotal Software, Inc.. All rights reserved.