|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.lip6.sma.simulacion.server.AgentImpl
fr.lip6.sma.simulacion.server.LocalAgentImpl
public abstract class LocalAgentImpl
Classe pour les agents locaux. Cette classe gère une liste de propriétés et répond au message getGame.
Field Summary | |
---|---|
private AgentListManager |
mAgentListManager
Référence sur la liste des agents. |
private String |
mAgentName
Référence sur le nom de l'agent. |
private Map |
mProperties
Référence sur les propriétés de l'agent. |
private PropertyChangeSupport |
mPropertyChangeSupport
Gestionnaire pour les changements des propriétés. |
Fields inherited from interface fr.lip6.sma.simulacion.server.Agent |
---|
AVATAR_PROPERTY_KEY, CLASS_KEY, IMPLEMENTATION_KEY, LOCATION_KEY, ONMAP_KEY, PROPERTIES_KEY, TYPE_PROPERTY_KEY |
Constructor Summary | |
---|---|
LocalAgentImpl(AgentListManager inAgentListManager,
String inAgentName,
Map inProperties)
Constructeur à partir du gestionnaire de liste, d'un nom et de propriétés. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener inListener)
Ajoute un client pour les changements des propriétés. |
void |
addPropertyChangeListener(String inPropertyName,
PropertyChangeListener inListener)
Ajoute un client pour les changements d'une propriété. |
String |
execute(String inOperationName,
Map inParams)
Exécute une opération. |
void |
executeAsync(String inOperationName,
Map inParams)
Exécute une opération de manière asynchrone sans retourner le résultat. |
protected AgentListManager |
getAgentListManager()
Accesseur sur la liste des agents. |
String |
getAgentName()
Accesseur sur le nom de l'agent. |
String |
getProperty(String inPropertyName)
Accesseur sur une propriété de l'agent. |
void |
removePropertyChangeListener(PropertyChangeListener inListener)
Supprime un client pour les changements des propriétés. |
void |
removePropertyChangeListener(String inPropertyName,
PropertyChangeListener inListener)
Supprimer un client pour les changements d'une propriété. |
protected String |
setProperty(String inPropertyName,
String inValue)
Sélecteur sur une propriété de l'agent. |
Methods inherited from class fr.lip6.sma.simulacion.server.AgentImpl |
---|
equals, hashCode |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface fr.lip6.sma.simulacion.server.Agent |
---|
equals, getAgentClass, hashCode |
Field Detail |
---|
private final AgentListManager mAgentListManager
private final String mAgentName
private final Map mProperties
private final PropertyChangeSupport mPropertyChangeSupport
Constructor Detail |
---|
public LocalAgentImpl(AgentListManager inAgentListManager, String inAgentName, Map inProperties)
inAgentListManager
- gestionnaire de la liste des agents.inAgentName
- nom de l'agent.inProperties
- propriétés de l'agent.Method Detail |
---|
protected final AgentListManager getAgentListManager()
public final String getAgentName()
getAgentName
in interface Agent
public final String getProperty(String inPropertyName)
getProperty
in interface LocalAgentWithProperties
inPropertyName
- nom de la propriété
null
si elle n'existe pas.protected final String setProperty(String inPropertyName, String inValue)
inPropertyName
- nom de la propriétéinValue
- la nouvelle valeur de la propriété.
public String execute(String inOperationName, Map inParams) throws AgentException
execute
in interface Agent
inOperationName
- nom de l'opération à exécuter.inParams
- paramètres de l'opération.
AgentException
- si l'opération n'existe pas ou un autre problème
est survenu dans l'exécution de la méthode de l'agent.public final void executeAsync(String inOperationName, Map inParams)
executeAsync
in interface Agent
executeAsync
in interface LocalAgent
inOperationName
- nom de l'opération à exécuter.inParams
- paramètres de l'opération.public final void addPropertyChangeListener(PropertyChangeListener inListener)
addPropertyChangeListener
in interface LocalAgentWithProperties
inListener
- client à ajouter.public final void addPropertyChangeListener(String inPropertyName, PropertyChangeListener inListener)
addPropertyChangeListener
in interface LocalAgentWithProperties
inPropertyName
- nom de la propriété.inListener
- client à ajouter.public final void removePropertyChangeListener(PropertyChangeListener inListener)
removePropertyChangeListener
in interface LocalAgentWithProperties
inListener
- client à supprimer.public final void removePropertyChangeListener(String inPropertyName, PropertyChangeListener inListener)
removePropertyChangeListener
in interface LocalAgentWithProperties
inPropertyName
- nom de la propriété.inListener
- client à supprimer.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |