|
Nested classes/interfaces inherited from class sajas.core.behaviours.Behaviour |
Behaviour.RunnableChangedEvent |
Field Summary | ||
String |
REQUEST_KEY key to retrieve from the DataStore of the behaviour the ACLMessage object sent by the initiator. |
|
String |
RESPONSE_KEY key to retrieve from the DataStore of the behaviour the ACLMessage object sent as a response to the initiator. |
|
String |
RESULT_NOTIFICATION_KEY key to retrieve from the DataStore of the behaviour the ACLMessage object sent as a result notification to the initiator. |
Fields inherited from class sajas.core.behaviours.FSMBehaviour |
currentName, lastStates |
Fields inherited from class sajas.core.behaviours.CompositeBehaviour |
currentExecuted |
Fields inherited from class sajas.core.behaviours.Behaviour |
myAgent, myEvent, NOTIFY_DOWN, NOTIFY_UP, parent, STATE_BLOCKED, STATE_READY, STATE_RUNNING |
Fields inherited from interface jade.domain.FIPANames.InteractionProtocol |
FIPA_BROKERING, FIPA_CONTRACT_NET, FIPA_DUTCH_AUCTION, FIPA_ENGLISH_AUCTION, FIPA_ITERATED_CONTRACT_NET, FIPA_PROPOSE, FIPA_QUERY, FIPA_RECRUITING, FIPA_REQUEST, FIPA_REQUEST_WHEN, FIPA_SUBSCRIBE, ITERATED_FIPA_REQUEST |
Constructor Summary | ||
AchieveREResponder(Agent a, jade.lang.acl.MessageTemplate mt) Constructor of the behaviour that creates a new empty DataStore |
||
AchieveREResponder(Agent a, jade.lang.acl.MessageTemplate mt, DataStore store) Constructor. |
Method Summary | ||
static jade.lang.acl.MessageTemplate |
createMessageTemplate(String iprotocol) This static method can be used to set the proper message Template (based on the interaction protocol and the performative) into the constructor of this behaviour. |
|
protected jade.lang.acl.ACLMessage |
handleRequest(jade.lang.acl.ACLMessage request) This method is called when the protocol initiation message (matching the MessageTemplate specified in the constructor) is received. |
|
protected jade.lang.acl.ACLMessage |
prepareResponse(jade.lang.acl.ACLMessage request) Deprecated. Use handleRequest() instead |
|
protected jade.lang.acl.ACLMessage |
prepareResultNotification(jade.lang.acl.ACLMessage request, jade.lang.acl.ACLMessage response) This method is called after the execution of the handleRequest() method if no response was sent or the response was an AGREE message. |
|
void |
registerHandleRequest(Behaviour b) This method allows to register a user defined Behaviour in the HANDLE_REQUEST state. |
|
void |
registerPrepareResponse(Behaviour b) Deprecated. Use registerHandleRequest() instead. |
|
void |
registerPrepareResultNotification(Behaviour b) This method allows to register a user defined Behaviour in the PREPARE_RESULT_NOTIFICATION state. |
|
void |
reset() Reset this behaviour using the same MessageTemplate. |
|
void |
reset(jade.lang.acl.MessageTemplate mt) This method allows to change the MessageTemplate that defines what messages this FIPARequestResponder will react to and reset the protocol. |
Methods inherited from class sajas.core.behaviours.SerialBehaviour |
handle |
Methods inherited from class sajas.core.behaviours.CompositeBehaviour |
action, done, handleBlockEvent, handleRestartEvent, registerAsChild, resetChildren, setAgent |
Methods inherited from class sajas.core.behaviours.Behaviour |
actionWrapper, block, block, getAgent, getBehaviourName, getDataStore, getExecutionState, getParent, getRestartCounter, isRunnable, onStart, restart, root, setBehaviourName, setDataStore, setExecutionState |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageTemplate
that defines what messages this FIPARequestResponder will react to and reset the protocol.AGREE, REFUSE, NOT_UNDERSTOOD, INFORM
.AGREE
message.
This default implementation returns null which has
the effect of sending no result notification. Programmers should
override the method in case they need to react to this event.INFORM, FAILURE
.Behaviour
in the HANDLE_REQUEST state.
This behaviour would override the homonymous method.
This method also set the DataStore of the registered Behaviour
to the
DataStore of this AchieveREResponder.
It is responsibility of the registered behaviour to put the
response to be sent into the DataStore at the RESPONSE_KEY
key.Behaviour
in the PREPARE_RESULT_NOTIFICATION state.
This behaviour would override the homonymous method.
This method also set the DataStore of the registered Behaviour
to the
DataStore of this AchieveREResponder.
It is responsibility of the registered behaviour to put the
result notification message to be sent into the DataStore at the
RESULT_NOTIFICATION_KEY
key.
|