|
||||||||||
| 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_RECRUITING_Participant
public abstract class FIPA_RECRUITING_Participant
Template for CFactories that manage fipa recruiting 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
| Field Summary | |
|---|---|
static String |
AGREE
|
static String |
BEGIN
|
static String |
FAILURE_NO_MATCH
|
static String |
FAILURE_PROXY
|
static String |
FINAL_RECRUITING_PARTICIPANT
|
static String |
INFORM
|
static String |
LOCATE_AGENTS
|
static String |
RECEIVE_PROXY
|
static String |
REFUSE
|
static String |
START_SUB_PROTOCOL
|
| Constructor Summary | |
|---|---|
FIPA_RECRUITING_Participant()
|
|
| Method Summary | |
|---|---|
protected void |
doAgree(CProcessor myProcessor,
ACLMessage messageToSend)
Sets the agree message to a proxy action |
protected void |
doBegin(CProcessor myProcessor,
ACLMessage msg)
Method executed at the beginning of the conversation |
protected void |
doFailureNoMatch(CProcessor myProcessor,
ACLMessage messageToSend)
Method to execute when there is no agents to recruit |
protected void |
doFailureProxy(CProcessor myProcessor,
ACLMessage messageToSend)
Sets the failure message |
protected void |
doFinalRecruitingParticipant(CProcessor myProcessor,
ACLMessage messageToSend)
End of the conversation |
protected void |
doInform(CProcessor myProcessor,
ACLMessage messageToSend)
Sets the inform message |
protected abstract ArrayList<AgentID> |
doLocateAgents(CProcessor myProcessor,
ACLMessage proxyMessage)
Locate agents to recruit |
protected abstract String |
doReceiveProxy(CProcessor myProcessor,
ACLMessage msg)
Method executed when the participant receive a message to proxy |
protected void |
doRefuse(CProcessor myProcessor,
ACLMessage messageToSend)
Sets the refuse message to a proxy action |
CFactory |
newFactory(String name,
MessageFilter filter,
ACLMessage template,
int availableConversations,
CAgent myAgent)
Creates a new participant fipa recruiting CFactory |
protected abstract boolean |
resultOfSubProtocol(CProcessor myProcessor,
ACLMessage subProtocolMessageResult)
Returns the result of a proxy action |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static String BEGIN
public static String RECEIVE_PROXY
public static String REFUSE
public static String AGREE
public static String LOCATE_AGENTS
public static String FAILURE_NO_MATCH
public static String START_SUB_PROTOCOL
public static String FAILURE_PROXY
public static String INFORM
public static String FINAL_RECRUITING_PARTICIPANT
| Constructor Detail |
|---|
public FIPA_RECRUITING_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 doReceiveProxy(CProcessor myProcessor,
ACLMessage msg)
myProcessor - the CProcessor managing the conversationmsg - proxy message
protected void doRefuse(CProcessor myProcessor,
ACLMessage messageToSend)
myProcessor - the CProcessor managing the conversationmessageToSend - refuse message
protected void doAgree(CProcessor myProcessor,
ACLMessage messageToSend)
myProcessor - the CProcessor managing the conversationmessageToSend - agree message
protected abstract ArrayList<AgentID> doLocateAgents(CProcessor myProcessor,
ACLMessage proxyMessage)
myProcessor - the CProcessor managing the conversationproxyMessage - proxy message sent by the initiator
protected void doFailureNoMatch(CProcessor myProcessor,
ACLMessage messageToSend)
myProcessor - the CProcessor managing the conversationmessageToSend - no match message
protected abstract boolean resultOfSubProtocol(CProcessor myProcessor,
ACLMessage subProtocolMessageResult)
myProcessor - the CProcessor managing the conversationsubProtocolMessageResult - result of the subprotocol
protected void doFailureProxy(CProcessor myProcessor,
ACLMessage messageToSend)
myProcessor - the CProcessor managing the conversationmessageToSend - failure message
protected void doInform(CProcessor myProcessor,
ACLMessage messageToSend)
myProcessor - the CProcessor managing the conversationmessageToSend - inform message
protected void doFinalRecruitingParticipant(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)
name - factory's namefilter - message filtertemplate - first message to sendavailableConversations - maximum number of conversation this CFactory can manage simultaneouslymyAgent - agent owner of this CFactory
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||