|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectContractNetInitiator
CoPS.agents.FormTeamBehaviour
Behaviour describing the process of forming a team. Team formation achieved through the use of the contract net protocol. Modified by Kari Roessland.
Constructor Summary | |
FormTeamBehaviour(Agent agent,
ACLMessage cfp)
The constructor only calls the constructor of the superclass of FormTeamBehaviour - ContracntNetInitiator |
Method Summary | |
protected void |
handleAllResponses(java.util.Vector responses,
java.util.Vector acceptances)
Method handling all proposals being received. |
protected void |
handleAllResultNotifications(java.util.Vector resultNotifications)
This method is called when all of the inform and failure messages are received, it checks if all of the agents that received an invitation has accepted to join the team. |
protected void |
handleFailure(ACLMessage failure)
This method is called each time a failure message is received. |
protected void |
handleInform(ACLMessage inform)
This method is called each time an inform message is received. |
protected void |
handleNotUnderstood(ACLMessage notUnderstood,
java.util.Vector acceptances)
This method is called every time the behaviour/agent receives a not-understood message. |
protected void |
handlePropose(ACLMessage propose,
java.util.Vector acceptances)
This method is called every time the behaviour/agent receives a propose message. |
protected void |
handleRefuse(ACLMessage refuse,
java.util.Vector acceptances)
This method is called every time the behaviour/agent receives a propose message. |
int |
onEnd()
|
protected java.util.Vector |
prepareCfps(ACLMessage cfp)
Method preparing all call for proposal messages being sent. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FormTeamBehaviour(Agent agent, ACLMessage cfp)
agent
- The owner of this behaviour.cfp
- The default call-for-proposal message.Method Detail |
protected java.util.Vector prepareCfps(ACLMessage cfp)
cfp
- The default call-for-proposal message.
protected void handlePropose(ACLMessage propose, java.util.Vector acceptances)
propose
- The incomming proposal message.acceptances
- A vector cotaining all acceptances messages.protected void handleNotUnderstood(ACLMessage notUnderstood, java.util.Vector acceptances)
notUnderstood
- The incomming not-understood message.acceptances
- A vector cotaining all acceptances messages.protected void handleRefuse(ACLMessage refuse, java.util.Vector acceptances)
refuse
- The incomming refuse message.acceptances
- A vector cotaining all acceptances messages.protected void handleAllResponses(java.util.Vector responses, java.util.Vector acceptances)
responses
- All response - messages in a Vector.acceptances
- A vector containing all acceptances messages.protected void handleInform(ACLMessage inform)
inform
- An inform messageprotected void handleFailure(ACLMessage failure)
failure
- A failure message.protected void handleAllResultNotifications(java.util.Vector resultNotifications)
resultNotifications
- A vector containing all of the result-notifications.public int onEnd()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |