teamSpace.agent
Class FailureBehaviour

java.lang.Object
  extended byOneShotBehaviour
      extended byteamSpace.agent.FailureBehaviour

public class FailureBehaviour
extends OneShotBehaviour

This class handles any failure that occurs during the process of solving a problem in the team space. The behaviour sees trough that the requester of the TeamSpace service is informed about the failure. And a failure -message is sent as a resultnotification of the request.

See Also:
Serialized Form

Constructor Summary
FailureBehaviour(Agent ag, DataStore dataStore, Behaviour topBehaviour, java.lang.String teamID)
          The constructor only calls the super-constructor.
 
Method Summary
 void action()
          The action method reports/specifies the failure, and returns a failure message to the TaskResponsible requesting for the TeamSpace.
 int onEnd()
          The method resets this behaviour and returns the transition from this state (behaviour).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FailureBehaviour

public FailureBehaviour(Agent ag,
                        DataStore dataStore,
                        Behaviour topBehaviour,
                        java.lang.String teamID)
The constructor only calls the super-constructor.

Parameters:
ag - The agent which get this behaviour
dataStore - The DataStore used in this behaviour
topBehaviour - A link to the Behaviour which defines the request protocol that this behaviour is a part of
Method Detail

action

public void action()
The action method reports/specifies the failure, and returns a failure message to the TaskResponsible requesting for the TeamSpace. This message is part of the Request-protocol implemented by TeamSpaceAgentBehaviour.


onEnd

public int onEnd()
The method resets this behaviour and returns the transition from this state (behaviour).

Returns:
The transition value