CoPS.CheckUpExample
Class PatientDBAgent

java.lang.Object
  extended byAgent
      extended byCoPS.agents.CoPSAgent
          extended byCoPS.agents.CoPSProblemSolver
              extended byCoPS.CheckUpExample.PatientDBAgent

public class PatientDBAgent
extends CoPSProblemSolver

A class extending CoPSProblemSolver, which implements a problem solver in our Checkup example application.

See Also:
Serialized Form

Constructor Summary
PatientDBAgent()
           
 
Method Summary
protected  boolean deceideWhetherToMakeProposal(ACLMessage request)
          This method is used to decide whether the agent should make a proposal or not.
protected  Codec[] initializeLanguages()
          This method initializes the agent's languages.
protected  Ontology[] initializeOntologies()
          Method for setting the ontologies this agent knows of.
protected  java.lang.String makeProposal(ACLMessage request)
          This method is not an example of how this parcing ought to be done.
 ACLMessage performAction(ACLMessage request)
          The method that is called when the agent has received a request for performing an action from the TeamSpaceAgent.
 ServiceDescription setServiceDescription()
          Method overridden from the class CoPSAgent.
 
Methods inherited from class CoPS.agents.CoPSProblemSolver
getCurrentRequest, getLanguages, getPartOfTeam, knownLanguage, knownOntology, setCurrentRequest, setPartOfTeam, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatientDBAgent

public PatientDBAgent()
Method Detail

setServiceDescription

public ServiceDescription setServiceDescription()
Method overridden from the class CoPSAgent.

Specified by:
setServiceDescription in class CoPSAgent
Returns:
The agents ServiceDescription object to be registered with the DF.

makeProposal

protected java.lang.String makeProposal(ACLMessage request)
This method is not an example of how this parcing ought to be done. It is just a mere dummy-method for creating a response which is working with one specially designed example.

Specified by:
makeProposal in class CoPSProblemSolver
Parameters:
request - The call-for-proposal message received from CheckUpTaskResponsible.
Returns:
A string describing the proposal.

deceideWhetherToMakeProposal

protected boolean deceideWhetherToMakeProposal(ACLMessage request)
This method is used to decide whether the agent should make a proposal or not.

Specified by:
deceideWhetherToMakeProposal in class CoPSProblemSolver
Parameters:
request - The call-for-proposal message.
Returns:
True or false.

initializeLanguages

protected Codec[] initializeLanguages()
This method initializes the agent's languages.

Specified by:
initializeLanguages in class CoPSProblemSolver
Returns:
A list of Codec objects.

initializeOntologies

protected Ontology[] initializeOntologies()
Method for setting the ontologies this agent knows of.

Specified by:
initializeOntologies in class CoPSProblemSolver
Returns:
A list of Ontology objects.

performAction

public ACLMessage performAction(ACLMessage request)
The method that is called when the agent has received a request for performing an action from the TeamSpaceAgent.

Specified by:
performAction in class CoPSProblemSolver
Parameters:
request - The request message.
Returns:
A message describing the output from performing the action.