fr.lifl.magique.skill.magique
Class ConnectionToBossSkill

java.lang.Object
  extended byfr.lifl.magique.skill.MagiqueDefaultSkill
      extended byfr.lifl.magique.skill.magique.ConnectionToBossSkill
All Implemented Interfaces:
Skill

public class ConnectionToBossSkill
extends MagiqueDefaultSkill

Skill used to connect the gifted agent to another one (who should know the "same" skill - in fact a skil with the same public signature) as its boss. Agenda is updated. And team of the boss too. The connectionToBossAuthorized method tells if the connection is accepted by the boss (default is always TRUE)

See Also:
DisconnectionSkill

Field Summary
 
Fields inherited from class fr.lifl.magique.skill.MagiqueDefaultSkill
myAgent
 
Constructor Summary
ConnectionToBossSkill(Agent myAgent)
           
 
Method Summary
 void connectionToBoss(java.lang.String bossName)
          connect me to the agent whose name is agent as my boss, this name must be of the form shortname@hostname:port but if the agent belongs to the same platform as me, shortName is
 java.lang.Boolean connectionToBossRequired(java.lang.String theOther)
          an agent wants me to be his boss, i can accept or not
 java.lang.Integer pathLength(java.lang.String agentName)
          returns the length of the path to reach the given agent when using the hierarchy
 
Methods inherited from class fr.lifl.magique.skill.MagiqueDefaultSkill
addAgenda, addSkill, addSkill, addSkill, addSkill, addToMyTeam, 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, broadcastToAll, broadcastToBasis, concurrentAsk, concurrentAsk, concurrentAsk, concurrentAsk, concurrentAsk, concurrentAsk, concurrentAsk, connectTo, connectToBoss, createOrder, createOrder, createOrder, createOrder, createOrder, createOrder, createQuestion, createQuestion, createQuestion, createQuestion, createQuestion, createQuestion, getAgenda, getMyAgent, getMyBoss, getMyTeam, getName, getPlatform, isAnswerReceived, isBigBoss, isBoss, perform, perform, perform, perform, perform, perform, perform, perform, perform, perform, perform, perform, perform, perform, removeFromMyTeam, removeSkill, removeSkillFromClassName, returnAnswer, returnValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionToBossSkill

public ConnectionToBossSkill(Agent myAgent)
Method Detail

connectionToBoss

public void connectionToBoss(java.lang.String bossName)
                      throws ConnectionRefusedException
connect me to the agent whose name is agent as my boss, this name must be of the form shortname@hostname:port but if the agent belongs to the same platform as me, shortName is

Parameters:
bossName - the agent i connect to
Throws:
ConnectionRefusedException

connectionToBossRequired

public java.lang.Boolean connectionToBossRequired(java.lang.String theOther)
an agent wants me to be his boss, i can accept or not

Parameters:
theOther - the agent who wants to connect to me

pathLength

public java.lang.Integer pathLength(java.lang.String agentName)
returns the length of the path to reach the given agent when using the hierarchy

Parameters:
agentName - the full name of the agent to reach
Returns:
the length of the path to reach given agent when using the hierarchy