Methods Summary |
---|
protected synchronized void | bind(java.lang.String name, AttributeSet attributes, java.rmi.Remote server)
NameAttributeSetPair nameAttributePair = new NameAttributeSetPair (name, attributes);
Object alreadyBoundObject = _ourTree.get(nameAttributePair);
if (null != alreadyBoundObject) {
throw new BindingException("Object already bound to " + name);
}
_ourTree.put(nameAttributePair, server);
|
private java.rmi.Remote[] | convertCollectionToRemoteArray(java.util.Collection remotes)
Iterator iterator = remotes.iterator();
Remote[] returnValue = new Remote[remotes.size()];
int counter = 0;
while (iterator.hasNext()) {
returnValue[counter] = (Remote) iterator.next();;
counter++;
}
return returnValue;
|
protected synchronized java.rmi.Remote[] | list()
return convertCollectionToRemoteArray(_ourTree.values());
|
protected synchronized java.rmi.Remote[] | list(AttributeSet attributes)
return list(null, attributes);
|
protected synchronized java.rmi.Remote[] | list(java.lang.String name, AttributeSet attributes)
NameAttributeSetPair queryObject = new NameAttributeSetPair (name, attributes);
ArrayList returnValues = new ArrayList();
Iterator i = _ourTree.keySet().iterator();
while (i.hasNext()) {
NameAttributeSetPair next = (NameAttributeSetPair) i.next();
if (next.matchesQueryObject(queryObject)) {
returnValues.add(_ourTree.get(next));
}
}
return convertCollectionToRemoteArray(returnValues);
|
protected synchronized java.rmi.Remote | lookup(java.lang.String name, AttributeSet attributes)
NameAttributeSetPair nameAttributePair = new NameAttributeSetPair (name, attributes);
return (Remote) _ourTree.get(nameAttributePair);
|
protected synchronized void | rebind(java.lang.String name, AttributeSet attributes, java.rmi.Remote server)
NameAttributeSetPair nameAttributePair = new NameAttributeSetPair (name, attributes);
_ourTree.remove(nameAttributePair);
_ourTree.put(nameAttributePair, server);
|
protected synchronized void | unbind(java.lang.String name, AttributeSet attributes)
NameAttributeSetPair nameAttributePair = new NameAttributeSetPair (name, attributes);
_ourTree.remove(nameAttributePair);
|