|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.lip6.sma.simulacion.server.AgentListManagerImpl fr.lip6.sma.simulacion.server.mdxr.MDXRAgentListManager
public class MDXRAgentListManager
Classe pour gérer la liste des agents sur le réseau. Cette classe s'interface avec le service mDNS et les agents sont accessibles par XML-RPC.
Field Summary | |
---|---|
private com.kallisys.zeroconf.MulticastDNSServer |
mMulticastDNSServer
Serveur MulticastDNS |
private int |
mPort
Port sur lequel écoute le serveur. |
private List |
mRegistrationRequests
Liste des requêtes d'enregistrement pour les agents locaux. |
private MDXRServer |
mServer
Référence sur le serveur. |
private static String |
SERVICE_TYPE
Type de service. |
Fields inherited from interface com.kallisys.zeroconf.MulticastDNSClient |
---|
BROWSERFLAG_MORECOMING, BROWSERFLAG_REMOVE |
Constructor Summary | |
---|---|
MDXRAgentListManager(MDXRServer inServer,
Collection inPlayerClasses)
Constructeur à partir d'un serveur MDXR. |
Method Summary | |
---|---|
private boolean |
agentIsLocal(String inServiceName)
Détermine si un agent repéré est en fait un agent local. |
void |
multicastDNSBrowserCallBack(int inRequestID,
int inBrowserFlags,
com.kallisys.zeroconf.NetService inService,
IOException inException)
Méthode appelée lorsqu'une réponse est arrivée ou lorsqu'une erreur est survenue. |
void |
multicastDNSRegistrationCallBack(int inRequestID,
com.kallisys.zeroconf.NetService inService,
IOException inException)
Méthode appelée lorsqu'une erreur est survenue lors de l'enregistrement d'un service. |
void |
multicastDNSResolutionCallBack(int inRequestID,
com.kallisys.zeroconf.NetService inService,
IOException inException)
Méthode appelée lorsqu'une réponse pour la résolution est arrivée. |
void |
registerLocalAgent(LocalAgent inLocalAgent)
Enregistre un agent local sur le réseau. |
private void |
registrationFailed(LocalAgent inLocalAgent)
Indique aux clients que l'enregistrement a échoué. |
(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 |
---|
private static final String SERVICE_TYPE
private final com.kallisys.zeroconf.MulticastDNSServer mMulticastDNSServer
private final int mPort
private final MDXRServer mServer
private final List mRegistrationRequests
Constructor Detail |
---|
MDXRAgentListManager(MDXRServer inServer, Collection inPlayerClasses)
inServer
- serveur MDXR (son port nous intéresse).inPlayerClasses
- classes des joueurs.Method Detail |
---|
public final void registerLocalAgent(LocalAgent inLocalAgent)
registerLocalAgent
in interface AgentListManager
registerLocalAgent
in class AgentListManagerImpl
inLocalAgent
- agent local à enregistrer sur le réseaupublic final void unregisterLocalAgent(LocalAgent inLocalAgent)
unregisterLocalAgent
in interface AgentListManager
unregisterLocalAgent
in class AgentListManagerImpl
inLocalAgent
- agent local à désenregistrer.public final void multicastDNSRegistrationCallBack(int inRequestID, com.kallisys.zeroconf.NetService inService, IOException inException)
multicastDNSRegistrationCallBack
in interface com.kallisys.zeroconf.MulticastDNSClient
inRequestID
- identifiant de la requêteinService
- service concernéinException
- exception décrivant l'erreur.public final void multicastDNSResolutionCallBack(int inRequestID, com.kallisys.zeroconf.NetService inService, IOException inException)
multicastDNSResolutionCallBack
in interface com.kallisys.zeroconf.MulticastDNSClient
inRequestID
- identifiant de la requêteinService
- service concerné (modifié, sauf si une erreur est
survenue)inException
- exception décrivant l'erreur (ou null
si aucune erreur n'est survenue)public final void multicastDNSBrowserCallBack(int inRequestID, int inBrowserFlags, com.kallisys.zeroconf.NetService inService, IOException inException)
multicastDNSBrowserCallBack
in interface com.kallisys.zeroconf.MulticastDNSClient
inRequestID
- identifiant de la requêteinBrowserFlags
- drapeaux indiquant ce qu'il faut faire du
résultat (constantes BROWSERFLAG_XXX de cette
interface).inService
- service retourné par le butineur de services,
peut être null
si une erreur est
survenue.inException
- exception s'il s'agit d'une erreur,
null
sinon.private void registrationFailed(LocalAgent inLocalAgent)
inLocalAgent
- agent qui n'a pas pu Ítre enregistrÈ.final void shutdown()
private boolean agentIsLocal(String inServiceName)
inServiceName
- nom de service de l'agent.
true
si c'est un agent local, false
sinon.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |