|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnenok.net.registry.RegistryImpl
public class RegistryImpl
A possible implementation of the NENOK knowledgebase registry server with an internal
Hashtable
. This associative storage links names of knowledgebases together with
Locator
objects that belong to this knowledgebase.
Constructor Summary | |
---|---|
RegistryImpl(String host)
Constructor: |
Method Summary | |
---|---|
boolean |
add(String knowledgebase,
Locator locator)
Adds a locator to the knowledgebase with the given name. |
boolean |
addAll(String knowledgebase,
Collection<Locator> locators)
Adds a collection of locators to the knowledgebasewith the given name. |
boolean |
addAll(String knowledgebase,
Locator[] locators)
Adds an array of locators to the knowledgebasewith the given name. |
boolean |
contains(String knowledgebase,
Locator locator)
Does the knowledgebase contain the given locator? |
boolean |
createKnowledgebase(String name)
Create a new knowledgebase with the given name. |
boolean |
deleteKnowledgebase(String knowledgebase)
Deletes the knowledgebase with the given name. |
boolean |
exists(String knowledgebase)
Does a knowledgebase with this name exist? |
String |
getIP()
|
Knowledgebase |
getKnowledgebase(String name)
Looks for a knowledgebase with the given name. |
String[] |
getKnowledgebases()
|
boolean |
remove(String knowledgebase,
Locator locator)
Removes a locator from the knowledgebase with the given name. |
void |
reset()
Resets the knowledgebase registry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RegistryImpl(String host)
host
- The name of the host running this registry.Method Detail |
---|
public boolean createKnowledgebase(String name)
Registry
createKnowledgebase
in interface Registry
name
- The name of the new knowledgebase.
false
if a knowledgebase with this name exists already.Registry.createKnowledgebase(java.lang.String)
public boolean deleteKnowledgebase(String knowledgebase)
Registry
deleteKnowledgebase
in interface Registry
knowledgebase
- The name of the knowledgebase to delete.
true
if a knowledgebase has been deleted.Registry.deleteKnowledgebase(java.lang.String)
public Knowledgebase getKnowledgebase(String name)
Registry
getKnowledgebase
in interface Registry
name
- The name of the knowledgebase to find.
null
.Registry.getKnowledgebase(java.lang.String)
public String[] getKnowledgebases() throws RemoteException
getKnowledgebases
in interface Registry
RemoteException
- Remote methods all throw remote exceptions.Registry.getKnowledgebases()
public boolean add(String knowledgebase, Locator locator) throws RemoteException
Registry
add
in interface Registry
knowledgebase
- The name of the knowledgebase.locator
- The locator to be added to the knowledgebase.
false
if a knowledgebase with the given name does
not exist, true
, if the element has been added successfully
RemoteException
- Remote methods all throw remote exceptions.Registry.add(java.lang.String, nenok.net.Locator)
public boolean addAll(String knowledgebase, Collection<Locator> locators) throws RemoteException
Registry
addAll
in interface Registry
knowledgebase
- The name of the knowledgebase.locators
- The collection of locators to add.
false
if a knowledgebase with the given name does
not exist, true
, if the knowledgebase changed as a result of the call.
RemoteException
- Remote methods all throw remote exceptions.Registry.addAll(java.lang.String, java.util.Collection)
public boolean addAll(String knowledgebase, Locator[] locators) throws RemoteException
Registry
addAll
in interface Registry
knowledgebase
- The name of the knowledgebase.locators
- The array of locators to add.
false
if a knowledgebase with the given name does
not exist, true
, if the knowledgebase changed as a result of the call.
RemoteException
- Remote methods all throw remote exceptions.Registry.addAll(java.lang.String, nenok.net.Locator[])
public boolean remove(String knowledgebase, Locator locator) throws RemoteException
Registry
remove
in interface Registry
knowledgebase
- The name of the knowledgebase.locator
- The locator to remove.
true
, if the locator has been removed successfully.
RemoteException
- Remote methods all throw remote exceptions.Registry.remove(java.lang.String, nenok.net.Locator)
public boolean contains(String knowledgebase, Locator locator) throws RemoteException
Registry
contains
in interface Registry
knowledgebase
- The name of the knowledgebase.locator
- The locator to find.
true
, if the knowledgebase contains the given locator.
RemoteException
- Remote methods all throw remote exceptions.Registry.contains(java.lang.String, nenok.net.Locator)
public boolean exists(String knowledgebase) throws RemoteException
Registry
exists
in interface Registry
knowledgebase
- The name of the knowledgebase.
true
, if a corresponding knowledgebase exist.
RemoteException
- Remote methods all throw remote exceptions.Registry.exists(java.lang.String)
public void reset() throws RemoteException
Registry
reset
in interface Registry
RemoteException
- Remote methods all throw remote exceptions.Registry.reset()
public String getIP() throws RemoteException
getIP
in interface Registry
RemoteException
- Remote methods all throw remote exceptions.Registry.getIP()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |