org.schemarepo.client
Class Avro1124RESTRepositoryClient

java.lang.Object
  extended by org.schemarepo.BaseRepository
      extended by org.schemarepo.client.Avro1124RESTRepositoryClient
All Implemented Interfaces:
Closeable, RepositoryClient, Repository

public class Avro1124RESTRepositoryClient
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 is the original implementation from AVRO-1124 issue

See Also:
RESTRepositoryClient

Field Summary
 
Fields inherited from class org.schemarepo.BaseRepository
closed, logger
 
Constructor Summary
Avro1124RESTRepositoryClient(String url)
           
 
Method Summary
 String getStatus()
          Return status information about the repository, such as whether it's healthy.
 Subject lookup(String subject)
           
 Subject register(String subject, SubjectConfig config)
           
 Iterable<Subject> subjects()
           
 
Methods inherited from class org.schemarepo.BaseRepository
close, exposeConfiguration, isValid, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.io.Closeable
close
 

Constructor Detail

Avro1124RESTRepositoryClient

@Inject
public Avro1124RESTRepositoryClient(@Named(value="schema-repo.url")
                                           String url)
Method Detail

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


Copyright © 2015. All rights reserved.