|
||||||||||
| 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_Participant
public abstract class FIPA_CONTRACTNET_Participant
Template for CFactories that manage fipa contract net participant 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_Participant()
|
|
| Method Summary | |
|---|---|
protected void |
doBegin(CProcessor myProcessor,
ACLMessage msg)
Method executed at the beginning of the conversation |
protected void |
doFinal(CProcessor myProcessor,
ACLMessage messageToSend)
Method executed when the conversation ends |
protected void |
doReceiveAccept(CProcessor myProcessor,
ACLMessage msg)
Method executed when the initiator accepts participant's proposal |
protected void |
doReceiveReject(CProcessor myProcessor,
ACLMessage msg)
Method executed when the initiator rejects participant's proposal |
protected abstract String |
doReceiveSolicit(CProcessor myProcessor,
ACLMessage msg)
Method executed when the participant receives a call for proposals |
protected void |
doSendFailure(CProcessor myProcessor,
ACLMessage messageToSend)
Method executed when the task failed |
protected abstract void |
doSendInfo(CProcessor myProcessor,
ACLMessage messageToSend)
Method executed when the task succeeded |
protected void |
doSendNotUnderstood(CProcessor myProcessor,
ACLMessage messageToSend)
Method executed when the participant sends a not-understood |
protected abstract void |
doSendProposal(CProcessor myProcessor,
ACLMessage messageToSend)
Method executed when the participant sends a proposal |
protected void |
doSendRefuse(CProcessor myProcessor,
ACLMessage messageToSend)
Method executed when the participant sends a refuse |
protected abstract String |
doTask(CProcessor myProcessor,
ACLMessage solicitMessage)
Perform the proposal's task |
CFactory |
newFactory(String name,
MessageFilter filter,
ACLMessage template,
int availableConversations,
CAgent myAgent,
int timeout)
Creates a new contract-net participant CFactory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FIPA_CONTRACTNET_Participant()
| Method Detail |
|---|
protected void doBegin(CProcessor myProcessor,
ACLMessage msg)
myProcessor - the CProcessor managing the conversationmsg - first message assigned to this conversation
protected abstract String doReceiveSolicit(CProcessor myProcessor,
ACLMessage msg)
myProcessor - the CProcessor managing the conversationmsg - call for proposals message
protected abstract void doSendProposal(CProcessor myProcessor,
ACLMessage messageToSend)
myProcessor - the CProcessor managing the conversationmessageToSend - proposal message
protected void doSendRefuse(CProcessor myProcessor,
ACLMessage messageToSend)
myProcessor - the CProcessor managing the conversationmessageToSend - refuse message
protected void doSendNotUnderstood(CProcessor myProcessor,
ACLMessage messageToSend)
myProcessor - the CProcessor managing the conversationmessageToSend - not-understood message
protected void doReceiveAccept(CProcessor myProcessor,
ACLMessage msg)
myProcessor - the CProcessor managing the conversationmsg - accept message
protected void doReceiveReject(CProcessor myProcessor,
ACLMessage msg)
myProcessor - the CProcessor managing the conversationmsg - reject message
protected abstract String doTask(CProcessor myProcessor,
ACLMessage solicitMessage)
myProcessor - the CProcessor managing the conversationsolicitMessage - the first message assigned to this conversation containing the solicit of the initiator agent
protected void doSendFailure(CProcessor myProcessor,
ACLMessage messageToSend)
myProcessor - the CProcessor managing the conversationmessageToSend - fail message
protected abstract void doSendInfo(CProcessor myProcessor,
ACLMessage messageToSend)
myProcessor - the CProcessor managing the conversationmessageToSend - inform message
protected void doFinal(CProcessor myProcessor,
ACLMessage messageToSend)
myProcessor - the CProcessor managing the conversationmessageToSend - final message
public CFactory newFactory(String name,
MessageFilter filter,
ACLMessage template,
int availableConversations,
CAgent myAgent,
int timeout)
name - factory's namefilter - message filtertemplate - first message to sendavailableConversations - maximum number of conversation this CFactory can manage simultaneouslymyAgent - agent owner of this CFactorytimeout - for waiting after sending the proposal
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||