CoPS.agents
Class FailureSpecificationBehaviour

java.lang.Object
  extended byOneShotBehaviour
      extended byCoPS.agents.FailureSpecificationBehaviour

public class FailureSpecificationBehaviour
extends OneShotBehaviour

This represents the failure-state of the FSM represented by PrepareResultBehaviour. The goal of the PrepareResultBehaviour is to place the result of the problem solving process in the datastore of the HandleProblemSovlingRequestBehaviour. If the one of the processes used for preparing this result fails, a FAILURE message should be placed in the HandleProblemSovlingRequestBehaviour datastore instead. In this way our agent will let the agent requesting the solution of a problem know that the problem solving process failed, and that an answer to the problem is not found.

See Also:
Serialized Form

Constructor Summary
FailureSpecificationBehaviour()
          The constructor.
FailureSpecificationBehaviour(Agent a, DataStore datastore, Behaviour topBehaviour)
          The constructor.
 
Method Summary
 void action()
          Action method.
 int onEnd()
          This method is called when the behaviour has finished.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FailureSpecificationBehaviour

public FailureSpecificationBehaviour()
The constructor.


FailureSpecificationBehaviour

public FailureSpecificationBehaviour(Agent a,
                                     DataStore datastore,
                                     Behaviour topBehaviour)
The constructor.

Parameters:
a - The owner of this behaviour.
topBehaviour - The behaviour from where this behaviour is added to the agent a.
Method Detail

action

public void action()
Action method. Adding the failure message to the right datastore, belonging to HandleProblemSolvingRequestBehaviour.


onEnd

public int onEnd()
This method is called when the behaviour has finished.

Returns:
The transition from this method.