nenok.net.registry
Interface Registry

All Superinterfaces:
Remote
All Known Implementing Classes:
RegistryImpl

public interface Registry
extends Remote

The interface of the NENOK knowledgebase registry service. It extends the Remote interface such that its objects are available for remote calls. Note, that all methods within this class must throw a RemoteException by the RMI standard.

From this interface, the knowledgebase service proxy is generated automatically. It is a so-called dumb proxy - this means that no computation on client side is performed at all. Method calls are transmitted to the server.

Version:
$LastChangedRevision: 556 $
$LastChangedDate: 2008-03-26 14:21:45 +0100 (Mi, 26 Mrz 2008) $
Author:
Marc Pouly

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 name)
          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.
 

Method Detail

reset

void reset()
           throws RemoteException
Resets the knowledgebase registry. Deletes all content of the activ registry.

Throws:
RemoteException - Remote methods all throw remote exceptions.

createKnowledgebase

boolean createKnowledgebase(String name)
                            throws RemoteException
Create a new knowledgebase with the given name.

Parameters:
name - The name of the new knowledgebase.
Returns:
false if a knowledgebase with this name exists already.
Throws:
RemoteException - Remote methods all throw remote exceptions.

deleteKnowledgebase

boolean deleteKnowledgebase(String name)
                            throws RemoteException
Deletes the knowledgebase with the given name.

Parameters:
name - The name of the knowledgebase to delete.
Returns:
true if a knowledgebase has been deleted.
Throws:
RemoteException - Remote methods all throw remote exceptions.

getKnowledgebase

Knowledgebase getKnowledgebase(String name)
                               throws RemoteException
Looks for a knowledgebase with the given name.

Parameters:
name - The name of the knowledgebase to find.
Returns:
The knowledgebase with the given name or null.
Throws:
RemoteException - Remote methods all throw remote exceptions.

getKnowledgebases

String[] getKnowledgebases()
                           throws RemoteException
Returns:
The names of all registered knowledgebases.
Throws:
RemoteException - Remote methods all throw remote exceptions.

add

boolean add(String knowledgebase,
            Locator locator)
            throws RemoteException
Adds a locator to the knowledgebase with the given name.

Parameters:
knowledgebase - The name of the knowledgebase.
locator - The locator to be added to the knowledgebase.
Returns:
false if a knowledgebase with the given name does not exist, true, if the element has been added successfully
Throws:
RemoteException - Remote methods all throw remote exceptions.

addAll

boolean addAll(String knowledgebase,
               Collection<Locator> locators)
               throws RemoteException
Adds a collection of locators to the knowledgebasewith the given name.

Parameters:
knowledgebase - The name of the knowledgebase.
locators - The collection of locators to add.
Returns:
false if a knowledgebase with the given name does not exist, true, if the knowledgebase changed as a result of the call.
Throws:
RemoteException - Remote methods all throw remote exceptions.

addAll

boolean addAll(String knowledgebase,
               Locator[] locators)
               throws RemoteException
Adds an array of locators to the knowledgebasewith the given name.

Parameters:
knowledgebase - The name of the knowledgebase.
locators - The array of locators to add.
Returns:
false if a knowledgebase with the given name does not exist, true, if the knowledgebase changed as a result of the call.
Throws:
RemoteException - Remote methods all throw remote exceptions.

remove

boolean remove(String knowledgebase,
               Locator locator)
               throws RemoteException
Removes a locator from the knowledgebase with the given name.

Parameters:
knowledgebase - The name of the knowledgebase.
locator - The locator to remove.
Returns:
true, if the locator has been removed successfully.
Throws:
RemoteException - Remote methods all throw remote exceptions.

exists

boolean exists(String knowledgebase)
               throws RemoteException
Does a knowledgebase with this name exist?

Parameters:
knowledgebase - The name of the knowledgebase.
Returns:
true, if a corresponding knowledgebase exist.
Throws:
RemoteException - Remote methods all throw remote exceptions.

contains

boolean contains(String knowledgebase,
                 Locator locator)
                 throws RemoteException
Does the knowledgebase contain the given locator?

Parameters:
knowledgebase - The name of the knowledgebase.
locator - The locator to find.
Returns:
true, if the knowledgebase contains the given locator.
Throws:
RemoteException - Remote methods all throw remote exceptions.

getIP

String getIP()
             throws RemoteException
Returns:
The IP of the host running this registry.
Throws:
RemoteException - Remote methods all throw remote exceptions.