fr.lifl.magique.skill.system
Class ConnectionSkill

java.lang.Object
  extended byfr.lifl.magique.skill.DefaultSkill
      extended byfr.lifl.magique.skill.system.ConnectionSkill
All Implemented Interfaces:
Skill

public class ConnectionSkill
extends DefaultSkill

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). Agenda is updated. The connectionAuthorized method tells if the connection is accepted (default is always TRUE)


Constructor Summary
ConnectionSkill(AtomicAgent myAgent)
           
 
Method Summary
 java.lang.Boolean connectionRequired(java.lang.String theOther)
          an agent wants to connect to me, i can accept or not
 void connectionTo(java.lang.String agent)
          connect me to the agent whose name is agent, this name must be of the form shortname@hostname:port but if the agent belongs to the same platform as me, shortName is sufficient.
 
Methods inherited from class fr.lifl.magique.skill.DefaultSkill
addAgenda, addSkill, addSkill, addSkill, addSkill, 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, connectTo, createOrder, createOrder, createOrder, createOrder, createOrder, createOrder, createQuestion, createQuestion, createQuestion, createQuestion, createQuestion, createQuestion, getAgenda, getMyAgent, getName, getPlatform, isAnswerReceived, perform, perform, perform, perform, perform, perform, perform, perform, perform, perform, perform, perform, perform, perform, removeSkill, removeSkillFromClassName, returnAnswer, returnValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionSkill

public ConnectionSkill(AtomicAgent myAgent)
Method Detail

connectionTo

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

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

connectionRequired

public java.lang.Boolean connectionRequired(java.lang.String theOther)
an agent wants to connect to me, i can accept or not

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