CoPS.agents
Class GetDecompositionBehaviour

java.lang.Object
  extended byAchieveREInitiator
      extended byCoPS.agents.GetDecompositionBehaviour

public class GetDecompositionBehaviour
extends AchieveREInitiator

This class represents a behaviour specifying the process of getting a decomposition of a problem. The Task Responsible starts a conversation with the Decomposer agent. Modified by Kari Roessland.

See Also:
Serialized Form

Constructor Summary
GetDecompositionBehaviour(Agent agent, ACLMessage message)
          The constructor only calls the super-class AchieveREInitiatior
 
Method Summary
protected  void handleAgree(ACLMessage agree)
          This method is called when the agent running this behaviour accepts an agree message.
protected  void handleFailure(ACLMessage failure)
          Called if a failure message is received.
protected  void handleInform(ACLMessage inform)
          Called if the responder responds with an inform message containing the decomposition.
protected  void handleNotUnderstood(ACLMessage notUnderstood)
          This method is called when the agent running this behaviour gets a not-understood message.
protected  void handleRefuse(ACLMessage refuse)
          Called if one of the contacted decomposers refuses decomposing the requested task.
 int onEnd()
          Method called after the behaviour is removed from the behaviour pool.
protected  java.util.Vector prepareRequests(ACLMessage request)
          Method which has to be implemented to set the request message to be sent dynamic in run-time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetDecompositionBehaviour

public GetDecompositionBehaviour(Agent agent,
                                 ACLMessage message)
The constructor only calls the super-class AchieveREInitiatior

Parameters:
agent - The owner of this behaviour
message - The default request message.
Method Detail

prepareRequests

protected java.util.Vector prepareRequests(ACLMessage request)
Method which has to be implemented to set the request message to be sent dynamic in run-time. Overrides AchieveREInitiators default implementation. Modified by Kari Roessland.

Parameters:
request - The default request message.
Returns:
A vector containing all of the request messages to be sent.

handleAgree

protected void handleAgree(ACLMessage agree)
This method is called when the agent running this behaviour accepts an agree message. Modified by Kari Roessland.

Parameters:
agree - An agree message.

handleNotUnderstood

protected void handleNotUnderstood(ACLMessage notUnderstood)
This method is called when the agent running this behaviour gets a not-understood message. New by Kari Roessland.

Parameters:
notUnderstood - A not-understood message.

handleRefuse

protected void handleRefuse(ACLMessage refuse)
Called if one of the contacted decomposers refuses decomposing the requested task. Modified by Kari Roessland.


handleInform

protected void handleInform(ACLMessage inform)
Called if the responder responds with an inform message containing the decomposition. Modified by Kari Roessland.

Parameters:
inform - An inform message.

handleFailure

protected void handleFailure(ACLMessage failure)
Called if a failure message is received. Modified by Kari Roessland.

Parameters:
failure - A failure message

onEnd

public int onEnd()
Method called after the behaviour is removed from the behaviour pool.

Returns:
The transition from this behaivour.