CoPS.agents
Class ProblemSolvingBehaviour

java.lang.Object
  extended byAchieveREResponder
      extended byCoPS.agents.ProblemSolvingBehaviour

public class ProblemSolvingBehaviour
extends AchieveREResponder

This class and behaviour assist a problem solving agent in the problem solving process by supporting a conversation with the TeamSpaceAgent.

See Also:
Serialized Form

Constructor Summary
ProblemSolvingBehaviour(Agent agent, MessageTemplate template)
          The constructor only calls the super-constructor.
 
Method Summary
 int onEnd()
          Information from the last execution of this behaviour is reset.
protected  ACLMessage prepareResponse(ACLMessage request)
          The agent desides if it can perform the action and prepares a response telling this.
protected  ACLMessage prepareResultNotification(ACLMessage request, ACLMessage response)
          The agent prepares the output from the action and returns it to the requester (TeamSpaceAgent).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProblemSolvingBehaviour

public ProblemSolvingBehaviour(Agent agent,
                               MessageTemplate template)
The constructor only calls the super-constructor.

Parameters:
agent - The owner of this behaviour
template - The template used as a filter to get the correct request message.
Method Detail

prepareResponse

protected ACLMessage prepareResponse(ACLMessage request)
The agent desides if it can perform the action and prepares a response telling this.

Parameters:
request - The incoming request message (request for performing an action).
Returns:
The response stating if the agent will perform the action or not.

prepareResultNotification

protected ACLMessage prepareResultNotification(ACLMessage request,
                                               ACLMessage response)
The agent prepares the output from the action and returns it to the requester (TeamSpaceAgent).

Parameters:
request - The request message.
response - The agent's response to the request message.
Returns:
A message with the solution/output of performing the action.

onEnd

public int onEnd()
Information from the last execution of this behaviour is reset.

Returns:
The final transition from this behaviour/state.