fr.lip6.sma.simulacion.server.http
Class HTTPAgentListManager

java.lang.Object
  extended by fr.lip6.sma.simulacion.server.AgentListManagerImpl
      extended by fr.lip6.sma.simulacion.server.http.HTTPAgentListManager
All Implemented Interfaces:
AgentListManager

public class HTTPAgentListManager
extends AgentListManagerImpl

Classe pour le gestionnaire de la liste des agents.

Version:
$Revision: 3 $
Author:
Paul Guyot
See Also:
"aucun test défini."

Field Summary
private  HTTPClient mClient
          Client HTTP.
private  LocalAgent mLocalAgent
          Agent local.
private  String mLocalAgentClass
          Classe de l'agent local.
private  String mLocalAgentName
          Nom de l'agent local.
 
Constructor Summary
HTTPAgentListManager(HTTPClient inClientHTTP, Collection inPlayerClasses)
          Constructeur à partir du client HTTP.
 
Method Summary
(package private)  void agentDisappeared(String inAgentClass, String inAgentName)
          Méthode appelée par le client HTTP lorsqu'un client a disparu.
protected  Set getLocalAgentKeys()
          Return the set of local agent keys (class:name).
(package private)  void newAgent(String inAgentClass, String inAgentName)
          Méthode appelée par le client HTTP lorsqu'un nouvel agent est présent.
(package private)  void rebuildAgentList(List inAgentList)
          Method called to rebuild the whole agent list.
 void registerLocalAgent(LocalAgent inLocalAgent)
          Enregistre l'agent local sur le réseau.
(package private)  void registrationFailed(LocalAgent inLocalAgent)
          Méthode appelée par le client HTTP lorsque l'enregistrement a échoué.
(package private)  void registrationSucceeded(LocalAgent inLocalAgent)
          Méthode appelée par le client HTTP lorsque l'enregistrement a réussi.
(package private)  void shutdown()
          Extinction.
 void unregisterLocalAgent(LocalAgent inLocalAgent)
          Désenregistre un agent local du réseau.
 
Methods inherited from class fr.lip6.sma.simulacion.server.AgentListManagerImpl
addListener, getAgent, getAgentByName, getAgentList, getAgentSet, isPlayerClass, removeListener, tellClientsThatListChanged, tellClientsThatRegistrationFailed, tellClientsThatRegistrationSucceeded
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mClient

private final HTTPClient mClient
Client HTTP.


mLocalAgentName

private String mLocalAgentName
Nom de l'agent local.


mLocalAgentClass

private String mLocalAgentClass
Classe de l'agent local.


mLocalAgent

private LocalAgent mLocalAgent
Agent local.

Constructor Detail

HTTPAgentListManager

public HTTPAgentListManager(HTTPClient inClientHTTP,
                            Collection inPlayerClasses)
Constructeur à partir du client HTTP.

Parameters:
inClientHTTP - client HTTP.
inPlayerClasses - classes des joueurs.
Method Detail

registerLocalAgent

public final void registerLocalAgent(LocalAgent inLocalAgent)
Enregistre l'agent local sur le réseau.

Specified by:
registerLocalAgent in interface AgentListManager
Specified by:
registerLocalAgent in class AgentListManagerImpl
Parameters:
inLocalAgent - agent local à enregistrer sur le réseau

unregisterLocalAgent

public final void unregisterLocalAgent(LocalAgent inLocalAgent)
Désenregistre un agent local du réseau.

Specified by:
unregisterLocalAgent in interface AgentListManager
Specified by:
unregisterLocalAgent in class AgentListManagerImpl
Parameters:
inLocalAgent - agent à désenregistrer.

shutdown

final void shutdown()
Extinction.


registrationSucceeded

final void registrationSucceeded(LocalAgent inLocalAgent)
Méthode appelée par le client HTTP lorsque l'enregistrement a réussi.

Parameters:
inLocalAgent - agent qui a été enregistré avec succès.

registrationFailed

final void registrationFailed(LocalAgent inLocalAgent)
Méthode appelée par le client HTTP lorsque l'enregistrement a échoué.

Parameters:
inLocalAgent - agent qui n'a pas pu être enregistré.

agentDisappeared

final void agentDisappeared(String inAgentClass,
                            String inAgentName)
Méthode appelée par le client HTTP lorsqu'un client a disparu.

Parameters:
inAgentName - nom de l'agent qui a disparu.
inAgentClass - classe de l'agent qui a disparu.

newAgent

final void newAgent(String inAgentClass,
                    String inAgentName)
Méthode appelée par le client HTTP lorsqu'un nouvel agent est présent.

Parameters:
inAgentName - nom du nouvel agent.
inAgentClass - classe du nouvel agent.

rebuildAgentList

final void rebuildAgentList(List inAgentList)
Method called to rebuild the whole agent list.

Parameters:
inAgentList - the new agent list (elements are class:name pairs).

getLocalAgentKeys

protected final Set getLocalAgentKeys()
Return the set of local agent keys (class:name).

Returns:
a set with the local agent keys.