public class ConfluentSchemaRegistryClient extends Object implements SchemaRegistryClient
Constructor and Description |
---|
ConfluentSchemaRegistryClient() |
ConfluentSchemaRegistryClient(org.springframework.web.client.RestTemplate template) |
ConfluentSchemaRegistryClient(org.springframework.web.client.RestTemplate template,
com.fasterxml.jackson.databind.ObjectMapper mapper) |
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).
|
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 ConfluentSchemaRegistryClient()
public ConfluentSchemaRegistryClient(org.springframework.web.client.RestTemplate template)
public ConfluentSchemaRegistryClient(org.springframework.web.client.RestTemplate template, com.fasterxml.jackson.databind.ObjectMapper mapper)
public void setEndpoint(String endpoint)
public SchemaRegistrationResponse register(String subject, String format, String schema)
SchemaRegistryClient
register
in interface SchemaRegistryClient
subject
- the full name of the schemaformat
- format of the schemaschema
- string representation of the schemaSchemaRegistrationResponse
representing the result of the
operationpublic String fetch(SchemaReference schemaReference)
SchemaRegistryClient
fetch
in interface SchemaRegistryClient
schemaReference
- a SchemaReference
used to identify the target
schema.public String fetch(int id)
SchemaRegistryClient
fetch
in interface SchemaRegistryClient
id
- the id of the target schema.Copyright © 2019 Pivotal Software, Inc.. All rights reserved.