|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.lip6.sma.simulacion.server.adapter.xmlrpc.XmlRpcAdapter
public class XmlRpcAdapter
Classe pour un adaptateur XmlRpc. Le module externe est un client/serveur XmlRpc. Lors de la première connexion, l'adapteur indique son propre port (choisi aléatoirement par la JVM). L'adresse et le port du module externe sont déterminés dans la configuration.
| Field Summary | |
|---|---|
private static String |
CLIENT_URL_PROPERTY
Propriété avec l'url du module externe. |
private static String |
INTERFACE_PROPERTY
Propriété avec l'interface sur laquelle écouter (si absente, on écoute sur loopback). |
private AgentListManager |
mAgentListManager
Référence sur le gestionnaire de la liste des agents. |
private XmlRpcClient |
mClient
Référence sur le client. |
private AdapterAgent |
mLocalAgent
Référence sur l'agent local. |
private int |
mPort
Numéro du port du serveur. |
private WebServer |
mServer
Référence sur le serveur. |
| Constructor Summary | |
|---|---|
XmlRpcAdapter(Configuration inConfiguration,
AgentListManager inAgentListManager)
Constructeur à partir de la configuration et du gestionnaire de liste. |
|
| Method Summary | |
|---|---|
Object |
execute(String inMethodName,
Vector inMethodParams)
Point d'entrée de l'adaptateur XML-RPC. |
String |
executeAgentMethod(String inAgentName,
String inAgentClass,
String inMethod,
Map inParams)
Exécute une méthode sur un agent. |
void |
listChanged()
Méthode appelée lorsque la liste a été modifiée. |
void |
registrationFailed(LocalAgent inLocalAgent)
Méthode appelée lorsque l'enregistrement a échoué. |
void |
registrationSucceeded(LocalAgent inLocalAgent)
Méthode appelée lorsque l'enregistrement a réussi. |
void |
shutdown()
Arrêt de l'adaptateur. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final String INTERFACE_PROPERTY
private static final String CLIENT_URL_PROPERTY
private final int mPort
private final WebServer mServer
private final XmlRpcClient mClient
private final AgentListManager mAgentListManager
private AdapterAgent mLocalAgent
| Constructor Detail |
|---|
public XmlRpcAdapter(Configuration inConfiguration,
AgentListManager inAgentListManager)
throws Exception
inConfiguration - configuration à utiliser.inAgentListManager - gestionnaire pour la liste des agents.
Exception - si un problème est survenu.| Method Detail |
|---|
public final String executeAgentMethod(String inAgentName,
String inAgentClass,
String inMethod,
Map inParams)
throws AgentException
executeAgentMethod in interface AdapterinAgentName - nom de l'agent.inAgentClass - classe de l'agent.inMethod - nom de la méthode à exécuter.inParams - paramètres de la méthode.
AgentException - si un problème est survenu.public final void shutdown()
shutdown in interface Adapter
public final Object execute(String inMethodName,
Vector inMethodParams)
throws Exception
execute in interface XmlRpcHandlerinMethodName - nom de la méthode.inMethodParams - paramètres de la méthode.
Exception - si un problème est survenu.public final void registrationSucceeded(LocalAgent inLocalAgent)
registrationSucceeded in interface AgentListClientinLocalAgent - agent enregistré avec succès.public final void registrationFailed(LocalAgent inLocalAgent)
registrationFailed in interface AgentListClientinLocalAgent - agent qui n'a pas pu être enregistré.public final void listChanged()
listChanged in interface AgentListClient
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||