kaos.domain.management
Interface RMIDomainDirectoryService

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
RMIDomainDirectoryServiceImpl

public interface RMIDomainDirectoryService
extends java.rmi.Remote

Defines the operations that can be invoked via RMI on a domain directory service.


Method Summary
 void addPolicies(java.util.Vector policies)
          Each element of the Vector is an instance of a Msg class specifying an individual policy fields
 void addPolicy(Msg policy)
           
 void changePolicies(java.util.Vector policies)
           
 void changePolicy(Msg policy)
           
 void deregister(AgentDescription desc)
          Remove the AgentDescription from the collection of domain entities registered in the directory.
 java.util.Map getDomainStructure()
          Obtain a Map containing the structure of the domain.
 java.util.Vector getPolicies()
          Obtain an Vector over all policies.
 java.util.Map getPoliciesByEntities()
           
 java.util.Vector getPoliciesForEntity(java.lang.String id)
           
 void modify(AgentDescription desc)
          Replace the AgentDescription in the collection of registered domain entities with the new AgentDescription.
 void register(AgentDescription desc)
          Add the AgentDescription to the collection of domain entities registered in the directory.
 void removePolicies(java.util.Vector policies)
           
 void removePolicy(Msg policy)
           
 AgentDescription[] search(AgentDescription desc)
          Search the collection of AgentDescriptions for all matching descriptions.
 AgentDescription[] search(AgentDescription desc, int maxResults)
          Search the collection of AgentDescriptions for all matching descriptions.
 

Method Detail

register

void register(AgentDescription desc)
              throws java.rmi.RemoteException,
                     AlreadyRegisteredException,
                     DirectoryFailure
Add the AgentDescription to the collection of domain entities registered in the directory.

Parameters:
desc - the AgentDescription to add.
Throws:
AlreadyRegisteredException - if the AgentDescription is already registered.
DirectoryFailure - if the directory service is not available.
java.rmi.RemoteException - if communication-related exception occurs

deregister

void deregister(AgentDescription desc)
                throws java.rmi.RemoteException,
                       NotRegisteredException,
                       DirectoryFailure
Remove the AgentDescription from the collection of domain entities registered in the directory.

Parameters:
desc - the AgentDescription to remove.
Throws:
NotRegisteredException - if the AgentDescription is not registered.
DirectoryFailure - if the directory service is not available.
java.rmi.RemoteException - if communication-related exception occurs.

modify

void modify(AgentDescription desc)
            throws java.rmi.RemoteException,
                   NotRegisteredException,
                   DirectoryFailure
Replace the AgentDescription in the collection of registered domain entities with the new AgentDescription.

Parameters:
desc - the new AgentDescription to replace the old one.
Throws:
NotRegisteredException - if the AgentDescription is not registered.
DirectoryFailure - if the directory service is not available.
java.rmi.RemoteException - if communication-related exception occurs.

search

AgentDescription[] search(AgentDescription desc)
                          throws java.rmi.RemoteException,
                                 SearchException,
                                 DirectoryFailure
Search the collection of AgentDescriptions for all matching descriptions. Return all results.

Parameters:
desc - the AgentDescription to use for matching.
Returns:
AgentDescription[] containing matching descriptions.
Throws:
SearchException - if an exception occurs during searching.
DirectoryFailure - if the directory service is unavailable.
java.rmi.RemoteException - if communication-related exception occurs.

search

AgentDescription[] search(AgentDescription desc,
                          int maxResults)
                          throws java.rmi.RemoteException,
                                 SearchException,
                                 DirectoryFailure
Search the collection of AgentDescriptions for all matching descriptions. Match on agent name, if agent name is null, then use agent nickname. Limit the returned results to the specified number. Only _agents table is searched.

Parameters:
desc - the AgentDescription to use for matching.
maxResults - the limit of returned results.
Returns:
AgentDescription[] containing the specified number, or less, of matching descriptions.
Throws:
SearchException - if an exception occurs during searching.
DirectoryFailure - if the directory service is not available.
java.rmi.RemoteException - if communication-related exception occurs.

addPolicy

void addPolicy(Msg policy)
               throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

addPolicies

void addPolicies(java.util.Vector policies)
                 throws java.rmi.RemoteException
Each element of the Vector is an instance of a Msg class specifying an individual policy fields

Parameters:
policies - The Vector of policies to be added to the collection of all policies.
Throws:
java.rmi.RemoteException

removePolicy

void removePolicy(Msg policy)
                  throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

removePolicies

void removePolicies(java.util.Vector policies)
                    throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

changePolicy

void changePolicy(Msg policy)
                  throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

changePolicies

void changePolicies(java.util.Vector policies)
                    throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

getPolicies

java.util.Vector getPolicies()
                             throws java.rmi.RemoteException
Obtain an Vector over all policies. Each element of the Enumeration is an instance of a Msg class specifying an individual policy fields.

Returns:
Vector of policy Msgs.
Throws:
java.rmi.RemoteException

getPoliciesForEntity

java.util.Vector getPoliciesForEntity(java.lang.String id)
                                      throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

getPoliciesByEntities

java.util.Map getPoliciesByEntities()
                                    throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

getDomainStructure

java.util.Map getDomainStructure()
                                 throws java.rmi.RemoteException
Obtain a Map containing the structure of the domain.

Returns:
Map of: hosts -> execution environments -> containers -> agents
Throws:
java.rmi.RemoteException