org.schemarepo.client
Class RESTRepositoryClient
java.lang.Object
org.schemarepo.BaseRepository
org.schemarepo.client.RESTRepositoryClient
- All Implemented Interfaces:
- Closeable, RepositoryClient, Repository
public class RESTRepositoryClient
- extends BaseRepository
- implements RepositoryClient
An Implementation of Repository that connects to a remote RESTRepository over HTTP.
Typically, this is used in a client wrapped in a CacheRepository to limit network communication.
Alternatively, this implementation can itself be what is used behind a RESTRepository in a RepositoryServer,
thus creating a caching proxy.
Note:This implementation diverges from the original AVRO-1124 issue
- See Also:
Avro1124RESTRepositoryClient
RESTRepositoryClient
@Inject
public RESTRepositoryClient(@Named(value="schema-repo.rest-client.server-url")
String url,
@Named(value="schema-repo.json.util-implementation")
JsonUtil jsonUtil,
@Named(value="schema-repo.rest-client.return-none-on-exceptions")
boolean returnNoneOnExceptions)
register
public Subject register(String subject,
SubjectConfig config)
- Specified by:
register in interface Repository
lookup
public Subject lookup(String subject)
- Specified by:
lookup in interface Repository
subjects
public Iterable<Subject> subjects()
- Specified by:
subjects in interface Repository
getStatus
public String getStatus()
- Description copied from interface:
RepositoryClient
- Return status information about the repository, such as whether it's healthy.
Details such as "what" and "representation" are up to the implementing classes.
- Specified by:
getStatus in interface RepositoryClient
- Returns:
- String representation of repository status
getConfiguration
public Properties getConfiguration(boolean includeDefaults)
exposeConfiguration
protected Map<String,String> exposeConfiguration()
- Overrides:
exposeConfiguration in class BaseRepository
Copyright © 2015. All rights reserved.