CoPS.agents
Class RespondToDecomposeRequestsBehaviour

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

public class RespondToDecomposeRequestsBehaviour
extends AchieveREResponder

Behaviour specifying what to do while waiting for a new task to decompose. Only messages with a request performative is processed. Null messages are ignored, while all other messages with performative not set to request are answered with a not-understood reply. Modified by Kari Roessland.

See Also:
Serialized Form

Constructor Summary
RespondToDecomposeRequestsBehaviour(Agent agent, MessageTemplate template)
          The constructor.
 
Method Summary
protected  ACLMessage prepareResponse(ACLMessage request)
          Method used to prepare the response, saying if the decomposer wants/can decompose the received task or not.
protected  ACLMessage prepareResultNotification(ACLMessage request, ACLMessage response)
          The method make and return a message containing a TMST.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RespondToDecomposeRequestsBehaviour

public RespondToDecomposeRequestsBehaviour(Agent agent,
                                           MessageTemplate template)
The constructor.

Parameters:
agent - The owner of this behaviour.
template - A message template used to filter the incoming request-messages.
Method Detail

prepareResponse

protected ACLMessage prepareResponse(ACLMessage request)
Method used to prepare the response, saying if the decomposer wants/can decompose the received task or not. Modified by Kari Roessland.

Parameters:
request - The incoming task-decomposition-request message.
Returns:
A message which is an agree-message, refuse-message or not-understood-message.

prepareResultNotification

protected ACLMessage prepareResultNotification(ACLMessage request,
                                               ACLMessage response)
The method make and return a message containing a TMST. Modified by Kari Roessland.

Parameters:
request - The received request message.
response - The response message sent before.
Returns:
A message definin the result of the composition, could either be an inform-message or a failure-message.