public class SimpleJsonHomeClient extends java.lang.Object implements JsonHomeClient
| Constructor and Description |
|---|
SimpleJsonHomeClient() |
| Modifier and Type | Method and Description |
|---|---|
de.otto.jsonhome.model.JsonHome |
get(java.net.URI uri)
Gets the JsonHome document associated to the specified URI.
|
void |
register(java.net.URI uri,
de.otto.jsonhome.model.JsonHome jsonHome)
Registers a JsonHome instance using an URI, uniquely identifying the instance.
|
void |
shutdown()
Shutdown the client and dispose all resources.
|
de.otto.jsonhome.model.JsonHome |
updateAndGet(java.net.URI uri)
Updates the (possibly cached) JsonHome instance identified by the URI and returns the updated instance.
|
public void register(java.net.URI uri,
de.otto.jsonhome.model.JsonHome jsonHome)
uri - the URI of the JsonHome instance.jsonHome - the registered JsonHome instance.public de.otto.jsonhome.model.JsonHome updateAndGet(java.net.URI uri)
get(java.net.URI). If you want to update an already
registered resource, use register(java.net.URI, de.otto.jsonhome.model.JsonHome).updateAndGet in interface JsonHomeClienturi - the URI uniquely identifying the JsonHome instance.public de.otto.jsonhome.model.JsonHome get(java.net.URI uri)
get in interface JsonHomeClienturi - the URI of the JsonHome document.public void shutdown()
JsonHomeClientshutdown in interface JsonHomeClient