org.schemarepo.client
Class RESTRepositoryClient

java.lang.Object
  extended by org.schemarepo.client.RESTRepositoryClient
All Implemented Interfaces:
Repository

public class RESTRepositoryClient
extends Object
implements Repository

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.


Constructor Summary
RESTRepositoryClient(String url)
           
 
Method Summary
 Subject lookup(String subject)
           
 Subject register(String subject, SubjectConfig config)
           
 Iterable<Subject> subjects()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RESTRepositoryClient

@Inject
public RESTRepositoryClient(@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


Copyright © 2014. All rights reserved.