|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectAchieveREInitiator
teamSpace.agent.HandleActionsBehaviour
This behaviour is a behaviour (state) in the FSMBehaviour
(final-state-machine) described by
the class TeamSpacePSBehaviour
. When we are in this state, there are one or more actions and/or
one or more PSMs to execute or handle. The behaivour implements a request protocol. Requests are made
for executors of the different actions/PSMs. If everything goes OK the state transits to CheckForActionsBehaviour
,
else it transits to FailureBehaviour
.
Constructor Summary | |
HandleActionsBehaviour(Agent ag,
ACLMessage request,
java.lang.String teamID)
The constructor calls the super-constructor. |
Method Summary | |
protected void |
handleAgree(ACLMessage agree)
Method is called when an AGREE message is received. |
protected void |
handleAllResultNotifications(java.util.Vector resultNotifications)
The method is called when all result notifications are received. |
protected void |
handleFailure(ACLMessage failure)
Method is called when a FAILURE message is received. |
protected void |
handleInform(ACLMessage inform)
The method is called when an INFORM message is received.
|
protected void |
handleNotUnderstood(ACLMessage notUnderstood)
Method is called when a NOT_UNDERSTOOD message is received. |
protected void |
handleRefuse(ACLMessage refuse)
Method is called when a REFUSE message is received. |
int |
onEnd()
The method resets this behaviour and returns the transition (for the FSM) |
protected java.util.Vector |
prepareRequests(ACLMessage request)
This method prepares the requests for executors of the different actions and PSMs that are ready to execute or compose. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HandleActionsBehaviour(Agent ag, ACLMessage request, java.lang.String teamID)
ag
- The agent which is the owner of this behaviourrequest
- The request that are sent as part of the protocol implemented by this behaviourMethod Detail |
protected java.util.Vector prepareRequests(ACLMessage request)
TSAction
and TSPSM
-classes. This information is extracted and
put into the request messages.
request
- The default request message (a templamte)
Vector
with request messagesprotected void handleNotUnderstood(ACLMessage notUnderstood)
NOT_UNDERSTOOD
message is received.
notUnderstood
- The messageprotected void handleAgree(ACLMessage agree)
AGREE
message is received.
agree
- The messageprotected void handleRefuse(ACLMessage refuse)
REFUSE
message is received.
refuse
- The messageprotected void handleFailure(ACLMessage failure)
FAILURE
message is received.
failure
- The messageprotected void handleInform(ACLMessage inform)
INFORM
message is received.
If the message is a solution to an action the corresponding TSAction
object
is updated and added to the list executedActions
.
If the message is a solution to an PSM the corresponding TSPSM
object
is updated and added to the list executedPSMs
.
inform
- The messageprotected void handleAllResultNotifications(java.util.Vector resultNotifications)
resultNotifications
- A Vector
containing all the result notificationspublic int onEnd()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |