vs.plotagent.behaviour
Class InitiateReachConsensusFramingOperatorBehaviour

java.lang.Object
  extended by jade.core.behaviours.Behaviour
      extended by jade.core.behaviours.CompositeBehaviour
          extended by jade.core.behaviours.SerialBehaviour
              extended by jade.core.behaviours.FSMBehaviour
                  extended by jade.proto.ProposeInitiator
                      extended by vs.plotagent.behaviour.InitiateReachConsensusFramingOperatorBehaviour
All Implemented Interfaces:
java.io.Serializable

public class InitiateReachConsensusFramingOperatorBehaviour
extends jade.proto.ProposeInitiator

Behaviour for reaching consensus about performing a given framing operator by PROPOSEing to all character agents to execute the framing operator, and allows registering a behaviour to be executed if all ACCEPT-PROPOSAL

Author:
swartjes
See Also:
Serialized Form

Field Summary
 
Fields inherited from class jade.proto.ProposeInitiator
ALL_RESPONSES_KEY, REPLY_KEY
 
Fields inherited from class jade.core.behaviours.Behaviour
STATE_BLOCKED, STATE_READY, STATE_RUNNING
 
Constructor Summary
InitiateReachConsensusFramingOperatorBehaviour(jade.core.Agent a, FramingOperator i)
          Constructor.
 
Method Summary
 java.util.Vector prepareInitiations(jade.lang.acl.ACLMessage msg)
          Is called right after the constructor, to prepare the message
 void registerHandleAllAcceptProposal(jade.core.behaviours.Behaviour b)
           
 void registerHandleSomeRejectProposal(jade.core.behaviours.Behaviour b)
           
 
Methods inherited from class jade.proto.ProposeInitiator
onStart, registerHandleAcceptProposal, registerHandleAllResponses, registerHandleNotUnderstood, registerHandleOutOfSequence, registerHandleRejectProposal, reset, reset, setDataStore
 
Methods inherited from class jade.core.behaviours.FSMBehaviour
deregisterState, getChildren, getLastExitValue, getName, getState, onEnd, registerDefaultTransition, registerDefaultTransition, registerFirstState, registerLastState, registerState, registerTransition, registerTransition, resetStates
 
Methods inherited from class jade.core.behaviours.CompositeBehaviour
action, block, done, restart, setAgent
 
Methods inherited from class jade.core.behaviours.Behaviour
actionWrapper, block, getBehaviourName, getDataStore, getExecutionState, isRunnable, root, setBehaviourName, setExecutionState
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InitiateReachConsensusFramingOperatorBehaviour

public InitiateReachConsensusFramingOperatorBehaviour(jade.core.Agent a,
                                                      FramingOperator i)
Constructor. Expected behaviour upon execution: the behaviour sends an AGREE or REFUSE as a response to the original REQUEST

Parameters:
a - the agent that starts the behaviour
i - the framing operator that the behaviour is trying to reach consensus on
Method Detail

prepareInitiations

public java.util.Vector prepareInitiations(jade.lang.acl.ACLMessage msg)
Is called right after the constructor, to prepare the message

Overrides:
prepareInitiations in class jade.proto.ProposeInitiator

registerHandleAllAcceptProposal

public void registerHandleAllAcceptProposal(jade.core.behaviours.Behaviour b)

registerHandleSomeRejectProposal

public void registerHandleSomeRejectProposal(jade.core.behaviours.Behaviour b)