kaos.core.csi.query
Interface QueryRegistration

All Known Implementing Classes:
QueryRegistrationImpl

public interface QueryRegistration

Defines the operations to query the different aspects of domain and actor registrations


Method Summary
 KAoSAgentDescription getActor(java.lang.String actorGUID)
          Returns description of the actor identified by the given name
 java.util.List getActorsFulfilling(java.lang.String actorConstraints)
          Returns description of the actors fullfiling constraints expressed as the KIF statemant
 java.util.List getActorsWithAttributes(java.util.Hashtable attributes)
          Returns descriptions of the actors whose KAoSAgentDescription contains all specified attributes and their values.
 java.util.List getAllAgents()
          Return all agent ids stored in the KAoS directory.
 DomainDescription getDomain(java.lang.String name)
          Returns description of the domain identified by the given name
 

Method Detail

getDomain

DomainDescription getDomain(java.lang.String name)
                            throws DirectoryFailure
Returns description of the domain identified by the given name

Parameters:
name - String specifying the name of the domain to lookup
Returns:
DomainDescription identified by the given name
Throws:
DirectoryFailure - if the connection to the DS cannot be established.

getActor

KAoSAgentDescription getActor(java.lang.String actorGUID)
                              throws DirectoryFailure,
                                     SearchException
Returns description of the actor identified by the given name

Parameters:
actorGUID - String specifying the GUID of the actor to lookup
Returns:
KAoSAgentDescription identified by the given name
Throws:
DirectoryFailure - if the connection to the DS cannot be established.
SearchException - if the actor with the given name has not been found in the DS

getActorsFulfilling

java.util.List getActorsFulfilling(java.lang.String actorConstraints)
                                   throws DirectoryFailure,
                                          NoSuchActorException,
                                          QueryFailure
Returns description of the actors fullfiling constraints expressed as the KIF statemant

Parameters:
actorConstraints - String specifying the GUID of the actor to lookup An example of a Constraints statement: Give me all agents that have as capability 'take picture' with a cost of less than $1,- with a reliability of 75% or better and where the average number of processed messages in the past hour is less than 20.
Returns:
KAoSAgentDescription identified by the given name
Throws:
DirectoryFailure - if the connection to the DS cannot be established.
NoSuchActorException - – if no actors matching the query properties could be found
QueryFailure - if query failed

getActorsWithAttributes

java.util.List getActorsWithAttributes(java.util.Hashtable attributes)
                                       throws DirectoryFailure,
                                              QueryFailure
Returns descriptions of the actors whose KAoSAgentDescription contains all specified attributes and their values.

Parameters:
attributes - Hashtable containing attribute names and their values to match the attributes in the DS.
Returns:
List containing KAoSAgentDescriptions matching the attributes.
Throws:
DirectoryFailure - if the connection to the DS cannot be established.
QueryFailure - if query failed

getAllAgents

java.util.List getAllAgents()
                            throws SearchException,
                                   DirectoryFailure
Return all agent ids stored in the KAoS directory.

Returns:
List of all agent unique IDs in the agent directory, or null, if there aren't any.
Throws:
SearchException - if an exception is thrown during the search.
DirectoryFailure - if the directory cannot be found/is not available.