|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sapia.archie.Archie
public class Archie
An instance of this class wraps a Node and offers a
user-friendly API on top of the latter.
| Constructor Summary | |
|---|---|
Archie()
|
|
Archie(Node root)
|
|
| Method Summary | |
|---|---|
void |
bind(Name n,
java.lang.Object o)
Binds the given object under the given name. |
NameParser |
getNameParser()
This method can be used by client applications to acquire the NameParser that this instance holds, in order to create
object representation of string-based names. |
Node |
getRoot()
The root node that this instance holds can be acquired to be manipulated in an application-defined way - by applying a custom lookup algorithm, for example. |
java.lang.Object |
lookup(Name n)
Looks up the object with the given name. |
Node |
lookupNode(Name n,
boolean create)
Looks up the Node with the given name. |
void |
rebind(Name n,
java.lang.Object o)
Binds the given object under the given name; if an object already exists under the given name, it is overwritten. |
void |
unbind(Name n)
Unbinds the value under the given name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Archie()
throws ProcessingException
ProcessingExceptionpublic Archie(Node root)
| Method Detail |
|---|
public Node getRoot()
Node of this instance.LookupStrategy
public java.lang.Object lookup(Name n)
throws NotFoundException,
ProcessingException
n - a Name
Object that corresponds to the given name.
NotFoundException - if no object could be found for the given name.
ProcessingException - if a problem occurs while performing the lookup.public NameParser getNameParser()
NameParser that this instance holds, in order to create
object representation of string-based names.
Example:
Name aName = archie.getNameParser().parse("some/object/name");
Object anObject = archie.lookup(aName);
NameParser that this instance uses.
public Node lookupNode(Name n,
boolean create)
throws NotFoundException,
ProcessingException
Node with the given name.
n - a Name
Node that corresponds to the given name.
NotFoundException - if no node could be found for the given name.
ProcessingException - if a problem occurs while performing the lookup.
public void unbind(Name n)
throws ProcessingException
n - a Name.
ProcessingException
public void bind(Name n,
java.lang.Object o)
throws DuplicateException,
ProcessingException
n - a Nameo - the Object to bind.
DuplicateException - if a object already exists for the given name.
ProcessingException - if a problem occurs while performing the binding.
public void rebind(Name n,
java.lang.Object o)
throws ProcessingException
n - a Nameo - the Object to bind.
DuplicateException - if a object already exists for the given name.
ProcessingException - if a problem occurs while performing the binding.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||