fr.lifl.magique.skill.magique
Class DisconnectionSkill

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

public class DisconnectionSkill
extends MagiqueDefaultSkill

Skills with ability for disconnection between agent (maybe boss)

See Also:
ConnectionSkill, fr.lifl.magique.skill.system.ConnectionToBossSkill

Field Summary
 
Fields inherited from class fr.lifl.magique.skill.MagiqueDefaultSkill
myAgent
 
Constructor Summary
DisconnectionSkill(Agent myAgent)
           
 
Method Summary
 java.lang.Boolean acknowledgeDisconnection(java.lang.String theOther)
          performed by an agent when another agent (theOther) asked for a disconnection from him
 java.lang.Boolean askForDisconnectionFrom(java.lang.String theOther)
          disconnects me from another agent (not my boss) : disconnection is safe in the sense that no request are lost during disconnection : every request who leaved me or my boss arrived to its its destination.
 java.lang.Boolean askForDisconnectionFromMyBoss()
          disconnects me from my boss : disconnection is safe in the sense that no request are lost during disconnection : every request who leaved me or my boss arrived to its its destination.
 void disconnectFromAll()
          disconect from everyone : acquaintances, team and boss
 void disconnectFromPlatform(java.lang.String platformName)
          disconnect from all agents coming from given platform
 void removeFromAgenda(java.lang.String theOther, java.lang.Boolean fromBoss)
          remove theOther from my agenda (due to a disconnection).
 
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

DisconnectionSkill

public DisconnectionSkill(Agent myAgent)
Method Detail

askForDisconnectionFromMyBoss

public java.lang.Boolean askForDisconnectionFromMyBoss()
disconnects me from my boss : disconnection is safe in the sense that no request are lost during disconnection : every request who leaved me or my boss arrived to its its destination. BUT nothing is said about what become the answers to questions I have asked or have been asked to answer... Reconnection through connectToBoss method can be performed (and then problem of answers is solved)

See Also:
Agent.connectToBoss(java.lang.String)

askForDisconnectionFrom

public java.lang.Boolean askForDisconnectionFrom(java.lang.String theOther)
disconnects me from another agent (not my boss) : disconnection is safe in the sense that no request are lost during disconnection : every request who leaved me or my boss arrived to its its destination. BUT nothing is said about what become the answers to questions I have asked or have been asked to answer... Reconnection through connectToBoss method can be performed (and then problem of answers is solved)

Parameters:
theOther - name of the agent i disconnect from
See Also:
AtomicAgent.connectTo(java.lang.String)

disconnectFromAll

public void disconnectFromAll()
disconect from everyone : acquaintances, team and boss


disconnectFromPlatform

public void disconnectFromPlatform(java.lang.String platformName)
disconnect from all agents coming from given platform

Parameters:
platformName - platform to disconnect from

removeFromAgenda

public void removeFromAgenda(java.lang.String theOther,
                             java.lang.Boolean fromBoss)
remove theOther from my agenda (due to a disconnection).

Parameters:
theOther - name of the agent to remove from my agenda
fromBoss - true iff disconnection from boss intitiator of the disconnection

acknowledgeDisconnection

public java.lang.Boolean acknowledgeDisconnection(java.lang.String theOther)
performed by an agent when another agent (theOther) asked for a disconnection from him

Parameters:
theOther - name of the agent who disconnect from me
Returns:
Boolean.TRUE to tell i agree and am ready for safe disconnection