jade.proto
Class SSIteratedContractNetResponder

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.SSContractNetResponder
                      extended by jade.proto.SSIteratedContractNetResponder
All Implemented Interfaces:
java.io.Serializable

public class SSIteratedContractNetResponder
extends SSContractNetResponder

See Also:
Serialized Form

Field Summary
 java.lang.String INITIATION_KEY
          Key to retrieve from the DataStore of the behaviour the initiation ACLMessage that triggered this responder session
 java.lang.String RECEIVED_KEY
          Key to retrieve from the DataStore of the behaviour the last received ACLMessage
 java.lang.String REPLY_KEY
          Key to set into the DataStore of the behaviour the new ACLMessage to be sent back to the initiator as a reply.
 
Fields inherited from class jade.proto.SSContractNetResponder
ACCEPT_PROPOSAL_KEY, CFP_KEY, HANDLE_ACCEPT_PROPOSAL, HANDLE_CFP, HANDLE_REJECT_PROPOSAL, PROPOSE_KEY, REJECT_PROPOSAL_KEY
 
Fields inherited from class jade.core.behaviours.FSMBehaviour
currentName, lastStates
 
Fields inherited from class jade.core.behaviours.Behaviour
myAgent
 
Constructor Summary
SSIteratedContractNetResponder(Agent a, ACLMessage cfp)
           
SSIteratedContractNetResponder(Agent a, ACLMessage cfp, DataStore store)
          Construct a SSIteratedContractNetResponder that is activated by the reception of a given initiation CFP message and uses a given DataStore.
 
Method Summary
protected  void afterReply(ACLMessage reply)
           
protected  void beforeReply(ACLMessage reply)
           
protected  boolean checkInSequence(ACLMessage received)
           
protected  void handleOutOfSequence(ACLMessage msg)
          This method is called whenever a message is received that does not comply to the protocol rules.
 void registerHandleOutOfSequence(Behaviour b)
          This method allows to register a user defined Behaviour in the HANDLE_OUT_OF_SEQ state.
 void reset()
          Reset this behaviour.
 
Methods inherited from class jade.proto.SSContractNetResponder
handleAcceptProposal, handleCfp, handleOutOfSequence, handleRejectProposal, registerHandleAcceptProposal, registerHandleCfp, registerHandleRejectProposal, reinit
 
Methods inherited from class jade.core.behaviours.FSMBehaviour
checkTermination, deregisterDefaultTransition, deregisterState, deregisterTransition, forceTransitionTo, getChildren, getCurrent, getLastExitValue, getName, getPrevious, getState, handleInconsistentFSM, handleStateEntered, hasDefaultTransition, onEnd, registerDefaultTransition, registerDefaultTransition, registerFirstState, registerLastState, registerState, registerTransition, registerTransition, resetStates, scheduleFirst, scheduleNext, stringifyTransitionTable
 
Methods inherited from class jade.core.behaviours.CompositeBehaviour
action, done, resetChildren, setAgent
 
Methods inherited from class jade.core.behaviours.Behaviour
block, block, getBehaviourName, getDataStore, getParent, isRunnable, onStart, restart, root, setBehaviourName, setDataStore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INITIATION_KEY

public final java.lang.String INITIATION_KEY
Key to retrieve from the DataStore of the behaviour the initiation ACLMessage that triggered this responder session


RECEIVED_KEY

public final java.lang.String RECEIVED_KEY
Key to retrieve from the DataStore of the behaviour the last received ACLMessage


REPLY_KEY

public final java.lang.String REPLY_KEY
Key to set into the DataStore of the behaviour the new ACLMessage to be sent back to the initiator as a reply.

Constructor Detail

SSIteratedContractNetResponder

public SSIteratedContractNetResponder(Agent a,
                                      ACLMessage cfp)

SSIteratedContractNetResponder

public SSIteratedContractNetResponder(Agent a,
                                      ACLMessage cfp,
                                      DataStore store)
Construct a SSIteratedContractNetResponder that is activated by the reception of a given initiation CFP message and uses a given DataStore.

Method Detail

checkInSequence

protected boolean checkInSequence(ACLMessage received)

beforeReply

protected void beforeReply(ACLMessage reply)

afterReply

protected void afterReply(ACLMessage reply)

handleOutOfSequence

protected void handleOutOfSequence(ACLMessage msg)
This method is called whenever a message is received that does not comply to the protocol rules. This default implementation does nothing. Programmers may override it in case they need to react to this event.

Parameters:
msg - the received out-of-sequence message.

registerHandleOutOfSequence

public void registerHandleOutOfSequence(Behaviour b)
This method allows to register a user defined Behaviour in the HANDLE_OUT_OF_SEQ state. This behaviour would override the homonymous method. This method also sets the data store of the registered Behaviour to the DataStore of this current behaviour. The registered behaviour can retrieve the out of sequence ACLMessage object received from the datastore at the RECEIVED_KEY key.

Parameters:
b - the Behaviour that will handle this state

reset

public void reset()
Reset this behaviour.

Overrides:
reset in class FSMBehaviour


These are the official JADE API. For these API backward compatibility is guaranteed accross JADE versions