public class SSIteratedContractNetResponder extends SSContractNetResponder
Modifier and Type | Field and Description |
---|---|
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.
|
ACCEPT_PROPOSAL_KEY, CFP_KEY, HANDLE_ACCEPT_PROPOSAL, HANDLE_CFP, HANDLE_REJECT_PROPOSAL, PROPOSE_KEY, REJECT_PROPOSAL_KEY
currentName, lastStates
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
handleAcceptProposal, handleCfp, handleOutOfSequence, handleRejectProposal, registerHandleAcceptProposal, registerHandleCfp, registerHandleRejectProposal, reinit
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
action, done, resetChildren, setAgent
block, block, getAgent, getBehaviourName, getDataStore, getParent, isRunnable, onStart, restart, root, setBehaviourName, setDataStore
public final java.lang.String INITIATION_KEY
public final java.lang.String RECEIVED_KEY
public final java.lang.String REPLY_KEY
public SSIteratedContractNetResponder(Agent a, ACLMessage cfp)
public SSIteratedContractNetResponder(Agent a, ACLMessage cfp, DataStore store)
protected boolean checkInSequence(ACLMessage received)
protected void beforeReply(ACLMessage reply)
protected void afterReply(ACLMessage reply)
protected void handleOutOfSequence(ACLMessage msg)
msg
- the received out-of-sequence message.public void registerHandleOutOfSequence(Behaviour b)
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.b
- the Behaviour that will handle this statepublic void reset()
reset
in class FSMBehaviour