|
Nested classes/interfaces inherited from class sajas.core.behaviours.Behaviour |
Behaviour.RunnableChangedEvent |
Field Summary | ||
String |
REQUEST_KEY | |
String |
RESPONSE_KEY | |
String |
RESULT_NOTIFICATION_KEY |
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 | ||
SimpleAchieveREResponder(Agent a, jade.lang.acl.MessageTemplate mt) Constructor of the behaviour that creates a new empty DataStore |
||
SimpleAchieveREResponder(Agent a, jade.lang.acl.MessageTemplate mt, DataStore store) Constructor. |
Method Summary | ||
void |
action() Runs the behaviour. |
|
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. |
|
boolean |
done() This method checks whether this behaviour has finished or not. |
|
protected jade.lang.acl.ACLMessage |
prepareResponse(jade.lang.acl.ACLMessage request) This method is called when the initiator's message is received that matches the message template passed in the constructor. |
|
protected jade.lang.acl.ACLMessage |
prepareResultNotification(jade.lang.acl.ACLMessage request, jade.lang.acl.ACLMessage response) This method is called after the response has been sent and only when one of the folliwing two cases arise: the response was an agree message OR no response message was sent. |
|
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.Behaviour |
actionWrapper, block, block, getAgent, getBehaviourName, getDataStore, getExecutionState, getParent, getRestartCounter, handle, handleBlockEvent, handleRestartEvent, isRunnable, onEnd, onStart, restart, root, setAgent, setBehaviourName, setDataStore, setExecutionState |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Behaviour
subclasses to perform ordinary behaviour
duty. An agent schedules its behaviours calling their
action()
method; since all the behaviours belonging
to the same agent are scheduled cooperatively, this method
must not enter in an endless loop and should return as
soon as possible to preserve agent responsiveness. To split a
long and slow task into smaller section, recursive behaviour
aggregation may be used.agree, refuse, not-understood, inform
. Remind to
use the method createReply of the class ACLMessage in order
to create a good reply messageagree
message OR no response
message was sent.
This default implementation return 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
. Remind to
use the method createReply of the class ACLMessage in order
to create a good reply messageMessageTemplate
that defines what messages this FIPARequestResponder will react to and reset the protocol.true
if this behaviour has completed its
task, false
otherwise.
|