kaos.core.service.directory
Class DefaultKAoSAgentDescription

java.lang.Object
  extended by BasicAgentDescription
      extended by kaos.core.service.directory.DefaultKAoSEntityDescription
          extended by kaos.core.service.directory.DefaultKAoSAgentDescription
All Implemented Interfaces:
KAoSAgentDescription, KAoSEntityDescription

public class DefaultKAoSAgentDescription
extends DefaultKAoSEntityDescription
implements KAoSAgentDescription

Implements the operations to access information about a KAoS agent. The information includes the ids of Guards guarding the agent, the id of the container the agent is running in, the agent's nickname, security status, and whether the agent supports conversations.


Field Summary
 
Fields inherited from interface kaos.core.service.directory.KAoSAgentDescription
AGENT_CAPABILITIES, AGENT_CONTAINER, AGENT_GUARD_IDS, AGENT_NICKNAME, AGENT_SECURITY_STATUS, AGENT_SUPPORTS_CONVERSATIONS, BasicAgentDescription_LOCATORS, BasicAgentDescription_NAME, HIDDEN_KEY_NAMES, IS_GOVERNABLE
 
Fields inherited from interface kaos.core.service.directory.KAoSEntityDescription
CONCEPT_MAPPING_NAME, ENTITY_DAML_S_TYPES, ENTITY_DOMAIN_NAMES, ENTITY_HOST_ADDRESS, ENTITY_HOST_NAME, ENTITY_ONTOLOGICAL_TYPE_NAMES, ENTITY_ONTOLOGICAL_TYPES, ENTITY_TYPE, EXECUTION_ENVIRONMENT, FULL_SEARCH, IS_ENTITY_POLICY_SUBJECT, IS_ENTITY_RUNNING, SEARCH_PARAMS
 
Constructor Summary
DefaultKAoSAgentDescription()
           
 
Method Summary
 void addCapability(AgentCapability capability)
          Add an AgentCapability to this description.
 void addGuardID(java.lang.String id)
          Set the id of a Guard that is guarding the agent's execution environment.
 java.lang.String getAgentContainer()
          Obtain the id of agent's container.
 java.lang.String getAgentNickname()
          Obtain the agent's nickname property contained by this KAoSAgentDescription.
 java.util.List getCapabilities()
          Obtain the collection of AgentCapabilities of this agent.
 java.util.List getGuardIDs()
          Obtain the ids of the Guards that are guarding the agent's execution environment.
 java.lang.String getSecurityStatus()
          Obtain the GUARDED/UNGUARDE security status of the agent.
 boolean getSupportsConversations()
          Obtain the property indicating whether the agent supports KAoS conversations.
 boolean removeCapability(AgentCapability capability)
          Remove the specified AgentCapability from the collection of this agent's capabilities.
 boolean removeGuardID(java.lang.String id)
          Remove a Guard id from the collection of Guard ids held by this KAoSAgentDescription.
 void setAgentContainer(java.lang.String container)
          Set the id of the container the agent is running in.
 void setAgentName(AgentName agentName)
          Set the agent name.
 void setAgentNickname(java.lang.String name)
          Set the agent's nickname.
 void setCapabilities(java.util.List capabilities)
          Set the collection of AgentCapabilities of this agent.
 void setSecurityStatus(java.lang.String status)
          Set agent's security status.
 void setSupportsConversations(boolean supports)
          Set the property telling whether the agent supports conversations.
 
Methods inherited from class kaos.core.service.directory.DefaultKAoSEntityDescription
addDomainName, addEntityDAMLSType, addEntityOntologicalType, clearLocators, getConceptMappingName, getDomainNames, getEntityDAMLSTypeNames, getEntityDAMLSTypes, getEntityNameAsString, getEntityOntologicalType, getEntityOntologicalTypeNames, getEntityOntologicalTypes, getEntityType, getExecutionEnv, getHostAddress, getHostName, getLocators, initialize, isEntityPolicySubject, isEntityRunning, logMessage, modifyProperties, removeDomainName, removeEntityDAMLSType, removeEntityOntologicalType, removeExecutionEnv, removeHostAddress, removeHostName, setConceptMappingName, setDomainNames, setEntityDAMLSTypes, setEntityNameAsString, setEntityOntologicalType, setEntityOntologicalTypes, setEntityType, setExecutionEnv, setHostAddress, setHostName, setIsEntityPolicySubject, setIsEntityRunning, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface kaos.core.service.directory.KAoSEntityDescription
addDomainName, addEntityDAMLSType, addEntityOntologicalType, clearLocators, getConceptMappingName, getDomainNames, getEntityDAMLSTypeNames, getEntityDAMLSTypes, getEntityNameAsString, getEntityOntologicalType, getEntityOntologicalTypeNames, getEntityOntologicalTypes, getEntityType, getExecutionEnv, getHostAddress, getHostName, isEntityPolicySubject, isEntityRunning, modifyProperties, removeDomainName, removeEntityDAMLSType, removeEntityOntologicalType, removeExecutionEnv, removeHostAddress, removeHostName, setConceptMappingName, setDomainNames, setEntityDAMLSTypes, setEntityNameAsString, setEntityOntologicalType, setEntityOntologicalTypes, setEntityType, setExecutionEnv, setHostAddress, setHostName, setIsEntityPolicySubject, setIsEntityRunning
 

Constructor Detail

DefaultKAoSAgentDescription

public DefaultKAoSAgentDescription()
Method Detail

setAgentContainer

public void setAgentContainer(java.lang.String container)
Set the id of the container the agent is running in.

Specified by:
setAgentContainer in interface KAoSAgentDescription
Parameters:
container - The id of the container in which the agent is running.

getAgentContainer

public java.lang.String getAgentContainer()
Obtain the id of agent's container.

Specified by:
getAgentContainer in interface KAoSAgentDescription
Returns:
String representing container the agent is running in.

setAgentName

public void setAgentName(AgentName agentName)
Set the agent name. Ensures that the name contains a valid namespace before setting.

Parameters:
name -

setAgentNickname

public void setAgentNickname(java.lang.String name)
Set the agent's nickname.

Specified by:
setAgentNickname in interface KAoSAgentDescription
Parameters:
name - The nickname the agent is using in addition to its name (GUID).

getAgentNickname

public java.lang.String getAgentNickname()
Obtain the agent's nickname property contained by this KAoSAgentDescription.

Specified by:
getAgentNickname in interface KAoSAgentDescription
Returns:
String representing the agent's nickname.

addGuardID

public void addGuardID(java.lang.String id)
Set the id of a Guard that is guarding the agent's execution environment. (Agent may be guarded by more than one Guard).

Specified by:
addGuardID in interface KAoSAgentDescription
Parameters:
id - The id of one of the agent's Guard.

getGuardIDs

public java.util.List getGuardIDs()
Obtain the ids of the Guards that are guarding the agent's execution environment.

Specified by:
getGuardIDs in interface KAoSAgentDescription
Returns:
List containing the ids of Guards guarding the agent.

removeGuardID

public boolean removeGuardID(java.lang.String id)
Remove a Guard id from the collection of Guard ids held by this KAoSAgentDescription.

Specified by:
removeGuardID in interface KAoSAgentDescription
Parameters:
name - The id of a Guard to be removed from the collection of Guard ids.
Returns:
true if the collection of Guard ids contained the specified id; otherwise return false.

setSupportsConversations

public void setSupportsConversations(boolean supports)
Set the property telling whether the agent supports conversations.

Specified by:
setSupportsConversations in interface KAoSAgentDescription
Parameters:
supports - The supports argument indicates whether the agent supports KAoS conversations.

getSupportsConversations

public boolean getSupportsConversations()
Obtain the property indicating whether the agent supports KAoS conversations.

Specified by:
getSupportsConversations in interface KAoSAgentDescription
Returns:
true if the agents supports conversations; otherwise return false.

setSecurityStatus

public void setSecurityStatus(java.lang.String status)
Set agent's security status.

Specified by:
setSecurityStatus in interface KAoSAgentDescription
Parameters:
name - The GUARDED/UNGUARDED security status of the agent.

getSecurityStatus

public java.lang.String getSecurityStatus()
Obtain the GUARDED/UNGUARDE security status of the agent.

Specified by:
getSecurityStatus in interface KAoSAgentDescription
Returns:
String containing the agent's security status.

addCapability

public void addCapability(AgentCapability capability)
Add an AgentCapability to this description.

Specified by:
addCapability in interface KAoSAgentDescription
Parameters:
capability - AgentCapability describing individual capability of this agent.

removeCapability

public boolean removeCapability(AgentCapability capability)
Remove the specified AgentCapability from the collection of this agent's capabilities.

Specified by:
removeCapability in interface KAoSAgentDescription
Parameters:
capability - The AgentCapability to be added to the collection of this agent's capabilities.
Returns:
true if the collection of ontological types contained the specified type; otherwise return false.

setCapabilities

public void setCapabilities(java.util.List capabilities)
Set the collection of AgentCapabilities of this agent. This will replace the existing List of capabilities.

Specified by:
setCapabilities in interface KAoSAgentDescription
Parameters:
capabilities - List containing the AgentCapabilities of this agent.

getCapabilities

public java.util.List getCapabilities()
Obtain the collection of AgentCapabilities of this agent.

Specified by:
getCapabilities in interface KAoSAgentDescription
Returns:
List of AgentCapability describing the capabilities of the agent.