|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjade.core.behaviours.Behaviour
jade.core.behaviours.CompositeBehaviour
jade.core.behaviours.SerialBehaviour
jade.core.behaviours.FSMBehaviour
jade.proto.SSContractNetResponder
jade.proto.SSIteratedContractNetResponder
public class SSIteratedContractNetResponder
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class jade.core.behaviours.Behaviour |
|---|
Behaviour.RunnableChangedEvent |
| Field Summary | |
|---|---|
protected static java.lang.String |
CHECK_IN_SEQ
|
protected static java.lang.String |
DUMMY_FINAL
|
protected static java.lang.String |
HANDLE_OUT_OF_SEQUENCE
|
java.lang.String |
INITIATION_KEY
Key to retrieve from the DataStore of the behaviour the initiation ACLMessage that triggered this responder session |
protected static java.lang.String |
RECEIVE_NEXT
|
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. |
protected static java.lang.String |
SEND_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.CompositeBehaviour |
|---|
currentExecuted |
| Fields inherited from class jade.core.behaviours.Behaviour |
|---|
myAgent, myEvent, NOTIFY_DOWN, NOTIFY_UP, parent, STATE_BLOCKED, STATE_READY, STATE_RUNNING |
| 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)
This method can be redefined by protocol specific implementations to update the status of the protocol just after a reply has been sent. |
protected void |
beforeReply(ACLMessage reply)
This method can be redefined by protocol specific implementations to customize a reply that is going to be sent back to the initiator. |
protected boolean |
checkInSequence(ACLMessage received)
Check whether a received message complies with the protocol rules. |
void |
onStart()
This method is just an empty placeholders for subclasses. |
protected void |
registerDSState(Behaviour b,
java.lang.String name)
Utility method to register a behaviour in a state of the protocol and set the DataStore appropriately |
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. |
protected void |
sessionTerminated()
This method can be redefined by protocol specific implementations to take proper actions after the completion of the current protocol session. |
| Methods inherited from class jade.proto.SSContractNetResponder |
|---|
handleAcceptProposal, handleCfp, handleOutOfSequence, handleOutOfSequence, handleRejectProposal, registerHandleAcceptProposal, registerHandleCfp, registerHandleRejectProposal, reinit |
| Methods inherited from class jade.core.behaviours.SerialBehaviour |
|---|
handle |
| Methods inherited from class jade.core.behaviours.CompositeBehaviour |
|---|
action, done, handleBlockEvent, handleRestartEvent, registerAsChild, resetChildren, setAgent |
| Methods inherited from class jade.core.behaviours.Behaviour |
|---|
actionWrapper, block, block, getBehaviourName, getDataStore, getExecutionState, getParent, getRestartCounter, isRunnable, restart, root, setBehaviourName, setDataStore, setExecutionState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final java.lang.String INITIATION_KEY
public final java.lang.String RECEIVED_KEY
public final java.lang.String REPLY_KEY
protected static final java.lang.String RECEIVE_NEXT
protected static final java.lang.String CHECK_IN_SEQ
protected static final java.lang.String HANDLE_OUT_OF_SEQUENCE
protected static final java.lang.String SEND_REPLY
protected static final java.lang.String DUMMY_FINAL
| Constructor Detail |
|---|
public SSIteratedContractNetResponder(Agent a,
ACLMessage cfp)
public SSIteratedContractNetResponder(Agent a,
ACLMessage cfp,
DataStore store)
| Method Detail |
|---|
protected boolean checkInSequence(ACLMessage received)
checkInSequence in class SSContractNetResponderprotected void beforeReply(ACLMessage reply)
beforeReply in class SSContractNetResponderprotected void afterReply(ACLMessage reply)
afterReply in class SSContractNetResponderpublic void onStart()
BehaviourBehaviour.
onStart in class Behaviourpublic 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 FSMBehaviourprotected void sessionTerminated()
protected void registerDSState(Behaviour b,
java.lang.String name)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||