fr.lifl.magique
Class AcquAgent

java.lang.Object
  extended byfr.lifl.magique.AbstractAgent
      extended byfr.lifl.magique.AtomicAgent
          extended byfr.lifl.magique.Agent
              extended byfr.lifl.magique.AcquAgent

public class AcquAgent
extends Agent


Field Summary
protected  AgentPoolManager poolManager
           
 
Fields inherited from class fr.lifl.magique.AtomicAgent
allKnownSkills, monitor, myConcurrencyPolicy, mySkills, unsentRequests
 
Fields inherited from class fr.lifl.magique.AbstractAgent
questionTable, toDo, verboseLevel
 
Constructor Summary
AcquAgent(java.lang.String name)
           
 
Method Summary
 void createNewPool(java.lang.String skillName, java.lang.String serviceName)
           
protected  void initBasicSkills()
          defines the skills known by the agent at creation.
 void perform(Request request)
          treat a request : if the agent knows the method, he applies it, else if someone in his team knows the method, he sends him the request, else he sends this to its supervisor
protected  void processAnswer(Request question)
          process an answer (to me)
 void setPoolHosts(java.lang.String[] hosts)
          change hosts for pool
 
Methods inherited from class fr.lifl.magique.Agent
addSkill, addSkill, broadcastToAll, broadcastToBasis, concurrentPerform, connectToBoss, getMyBoss, getMyTeam, getUnsentRequests, isBasis, isBigBoss, isBoss, removeSkill, send, send, sendUnsentRequestToBoss, sendUp, setAction
 
Methods inherited from class fr.lifl.magique.AtomicAgent
addSkill, connectTo, getAllKnownSkills, getPlatform, giveSkillClassNameFromSignature, initialize, interprete, myMethodsNames, processRequest, removeSkillFromClassName, sendMessage, setAction, setConcurrencyPolicy, setPlatform, start, treatUnsentRequests
 
Methods inherited from class fr.lifl.magique.AbstractAgent
addAgenda, ask, ask, ask, ask, ask, ask, ask, ask, ask, ask, ask, ask, ask, ask, askNow, askNow, askNow, askNow, askNow, askNow, askNow, askNow, askNow, askNow, askNow, askNow, askNow, askNow, concurrentAsk, concurrentAsk, concurrentAsk, concurrentAsk, concurrentAsk, concurrentAsk, concurrentAsk, createOrder, createOrder, createOrder, createOrder, createOrder, createOrder, createQuestion, createQuestion, createQuestion, createQuestion, createQuestion, createQuestion, createQuestion, createQuestion, forgetQuestion, getAgenda, getAnswerer, getListener, getName, getQuestionTable, getToDo, getVerboseLevel, isAnswerReceived, perform, perform, perform, perform, perform, perform, perform, perform, perform, perform, perform, perform, perform, returnAnswer, returnValue, setName, setQuestionTable, setVerboseLevel, stopListener, verbose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

poolManager

protected AgentPoolManager poolManager
Constructor Detail

AcquAgent

public AcquAgent(java.lang.String name)
Method Detail

initBasicSkills

protected void initBasicSkills()
                        throws SkillAlreadyAcquiredException
defines the skills known by the agent at creation.

Overrides:
initBasicSkills in class Agent
Throws:
SkillAlreadyAcquiredException - if agent tries to learn an already known skill

setPoolHosts

public void setPoolHosts(java.lang.String[] hosts)
change hosts for pool


perform

public void perform(Request request)
treat a request : if the agent knows the method, he applies it, else if someone in his team knows the method, he sends him the request, else he sends this to its supervisor

Overrides:
perform in class Agent
Parameters:
request - the request to be treated
Returns:
no return value

createNewPool

public void createNewPool(java.lang.String skillName,
                          java.lang.String serviceName)

processAnswer

protected void processAnswer(Request question)
process an answer (to me)

Overrides:
processAnswer in class AbstractAgent