|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectes.upv.dsic.gti_ia.cAgents.protocols.FIPA_CONTRACTNET_Initiator
public abstract class FIPA_CONTRACTNET_Initiator
Template for CFactories that manage fipa contract net initiator conversation. The user has to create his/her own class extending from this one. And implement the abstract methods. Other methods can be overriden in order to modify the default behaviour
| Constructor Summary | |
|---|---|
FIPA_CONTRACTNET_Initiator()
|
|
| Method Summary | |
|---|---|
protected void |
doBegin(CProcessor myProcessor,
ACLMessage msg)
Method executed at the beginning of the conversation |
protected abstract void |
doEvaluateProposals(CProcessor myProcessor,
ArrayList<ACLMessage> proposes,
ArrayList<ACLMessage> acceptances,
ArrayList<ACLMessage> rejections)
Evaluate proposals. |
protected void |
doFinal(CProcessor myProcessor,
ACLMessage messageToSend)
Method executed when the initiator ends the conversation |
protected void |
doReceiveFailure(CProcessor myProcessor,
ACLMessage msg)
Method executed when the initiator receives a failure |
protected abstract void |
doReceiveInform(CProcessor myProcessor,
ACLMessage msg)
Method executed when the initiator receives a inform |
protected void |
doReceiveNotUnderstood(CProcessor myProcessor,
ACLMessage msg)
Method executed when the initiator receives a not-understood message |
protected void |
doReceiveProposal(CProcessor myProcessor,
ACLMessage msg)
Method executed when the initiator receives a proposal |
protected void |
doReceiveRefuse(CProcessor myProcessor,
ACLMessage msg)
Method executed when the initiator receives a refuse message |
protected void |
doSolicitProposals(CProcessor myProcessor,
ACLMessage messageToSend)
Method executed when the initiator calls for proposals |
protected void |
doTimeout(CProcessor myProcessor,
ACLMessage msg)
Method executed when the timeout is reached while the initiator was waiting for proposals |
CFactory |
newFactory(String name,
MessageFilter filter,
ACLMessage template,
int availableConversations,
CAgent myAgent,
int participants,
long deadline,
int timeout)
Creates a new contract net initiator factory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FIPA_CONTRACTNET_Initiator()
| Method Detail |
|---|
protected void doBegin(CProcessor myProcessor,
ACLMessage msg)
myProcessor - the CProcessor managing the conversationmsg - first message to send in the conversation
protected void doSolicitProposals(CProcessor myProcessor,
ACLMessage messageToSend)
myProcessor - the CProcessor managing the conversationmessageToSend - Message to send
protected void doReceiveNotUnderstood(CProcessor myProcessor,
ACLMessage msg)
myProcessor - the CProcessor managing the conversationmsg - not-understood message
protected void doReceiveRefuse(CProcessor myProcessor,
ACLMessage msg)
myProcessor - the CProcessor managing the conversationmsg - refuse message
protected void doReceiveProposal(CProcessor myProcessor,
ACLMessage msg)
myProcessor - the CProcessor managing the conversationmsg - proposal message
protected void doTimeout(CProcessor myProcessor,
ACLMessage msg)
myProcessor - the CProcessor managing the conversationmsg - timeout message
protected abstract void doEvaluateProposals(CProcessor myProcessor,
ArrayList<ACLMessage> proposes,
ArrayList<ACLMessage> acceptances,
ArrayList<ACLMessage> rejections)
myProcessor - the CProcessor managing the conversationproposes - Proposalsacceptances - Accepted proposalsrejections - Rejected proposals
protected void doReceiveFailure(CProcessor myProcessor,
ACLMessage msg)
myProcessor - the CProcessor managing the conversationmsg - the failure message
protected abstract void doReceiveInform(CProcessor myProcessor,
ACLMessage msg)
myProcessor - the CProcessor managing the conversationmsg - inform message
protected void doFinal(CProcessor myProcessor,
ACLMessage messageToSend)
myProcessor - the CProcessor managing the conversationmessageToSend - final message of this conversation
public CFactory newFactory(String name,
MessageFilter filter,
ACLMessage template,
int availableConversations,
CAgent myAgent,
int participants,
long deadline,
int timeout)
name - of the factoryfilter - message filtertemplate - first message to sendavailableConversations - maximum number of conversation this CFactory can manage simultaneouslymyAgent - agent owner of this Cfactoryparticipants - number of participantsdeadline - for waiting for proposalstimeout - for waiting for inform
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||