es.upv.dsic.gti_ia.cAgents.protocols
Class FIPA_RECRUITING_Initiator

java.lang.Object
  extended by es.upv.dsic.gti_ia.cAgents.protocols.FIPA_RECRUITING_Initiator

public abstract class FIPA_RECRUITING_Initiator
extends Object

Template for CFactories that manage fipa recruiting 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

Author:
ricard

Constructor Summary
FIPA_RECRUITING_Initiator()
           
 
Method Summary
protected  void doBegin(CProcessor myProcessor, ACLMessage msg)
          Method executed at the beginning of the conversation
protected  void doFinalRecruitingInitiator(CProcessor myProcessor, ACLMessage messageToSend)
          Method executed when the conversation ends
protected  void doReceiveAgree(CProcessor myProcessor, ACLMessage msg)
          Method executed when the initiator receives an agree message
protected  void doReceiveFailureNoMatch(CProcessor myProcessor, ACLMessage msg)
          Method executed when the initiator receives a no match message
protected  void doReceiveFailureProxy(CProcessor myProcessor, ACLMessage msg)
          Method executed when the initiator receives a proxy failure message
protected  void doReceiveInform(CProcessor myProcessor, ACLMessage msg)
          Method executed when the initiator receives an inform message
protected  void doReceiveRefuse(CProcessor myProcessor, ACLMessage msg)
          Method executed when the initiator receives a refuse message
 CFactory newFactory(String name, MessageFilter filter, ACLMessage template, int availableConversations, CAgent myAgent, long timeout)
          Creates a new initiator fipa recruiting cfactory
protected abstract  void setProxyMessage(CProcessor myProcessor, ACLMessage messageToSend)
          Set the proxy message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FIPA_RECRUITING_Initiator

public FIPA_RECRUITING_Initiator()
Method Detail

doBegin

protected void doBegin(CProcessor myProcessor,
                       ACLMessage msg)
Method executed at the beginning of the conversation

Parameters:
myProcessor - the CProcessor managing the conversation
msg - first message to send

setProxyMessage

protected abstract void setProxyMessage(CProcessor myProcessor,
                                        ACLMessage messageToSend)
Set the proxy message

Parameters:
myProcessor - the CProcessor managing the conversation
messageToSend - proxy message

doReceiveRefuse

protected void doReceiveRefuse(CProcessor myProcessor,
                               ACLMessage msg)
Method executed when the initiator receives a refuse message

Parameters:
myProcessor - the CProcessor managing the conversation
msg - refuse message

doReceiveAgree

protected void doReceiveAgree(CProcessor myProcessor,
                              ACLMessage msg)
Method executed when the initiator receives an agree message

Parameters:
myProcessor - the CProcessor managing the conversation
msg - agree message

doReceiveFailureProxy

protected void doReceiveFailureProxy(CProcessor myProcessor,
                                     ACLMessage msg)
Method executed when the initiator receives a proxy failure message

Parameters:
myProcessor - the CProcessor managing the conversation
msg - proxy failure message

doReceiveFailureNoMatch

protected void doReceiveFailureNoMatch(CProcessor myProcessor,
                                       ACLMessage msg)
Method executed when the initiator receives a no match message

Parameters:
mmyProcessor - the CProcessor managing the conversation
msg - no match message

doReceiveInform

protected void doReceiveInform(CProcessor myProcessor,
                               ACLMessage msg)
Method executed when the initiator receives an inform message

Parameters:
myProcessor - the CProcessor managing the conversation
msg - inform message

doFinalRecruitingInitiator

protected void doFinalRecruitingInitiator(CProcessor myProcessor,
                                          ACLMessage messageToSend)
Method executed when the conversation ends

Parameters:
myProcessor - the CProcessor managing the conversation
messageToSend - final message

newFactory

public CFactory newFactory(String name,
                           MessageFilter filter,
                           ACLMessage template,
                           int availableConversations,
                           CAgent myAgent,
                           long timeout)
Creates a new initiator fipa recruiting cfactory

Parameters:
name - factory's name
filter - message filter
template - first message to send
availableConversations - maximum conversation that can be managed by this CFactory
myAgent - agent owner of this CFactory
timeout - for waiting after sending the proxy message
Returns:
a new fipa recruiting initiator factory


Copyright © 2012 GTI-IA. All Rights Reserved.