Resolving a resource provides back a resource reference.
Resource references are the basis for handling an eventual
cache between the store of the resource and its memory image (ie
the resource instance).
All resource spaces must provide some notion of resource reference.
A typical access to a resource looks like:
ResourceReference rr = space.lookup("/x/y/z");
try {
Resource r = rr.lock();
// Fiddle with the resource:
r.setValue("foo", new Integer(10));
} catch (InvalidResourceException e) {
System.out.println(e.getMessage());
} finally {
// Make sure to unlock the reference:
rr.unlock();
|