From 00313858b00814401ae1360bf42c10d6be88bee6 Mon Sep 17 00:00:00 2001 From: Notmoo Date: Tue, 1 Aug 2017 16:29:44 +0200 Subject: [PATCH] Module Server, clss SimpleMessageHandler : correction erreurs de compilation --- .../com/pqt/server/controller/SimpleMessageHandler.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Workspace/server/src/main/WEB-INF/classes/com/pqt/server/controller/SimpleMessageHandler.java b/Workspace/server/src/main/WEB-INF/classes/com/pqt/server/controller/SimpleMessageHandler.java index 7221d457..1d22eb37 100644 --- a/Workspace/server/src/main/WEB-INF/classes/com/pqt/server/controller/SimpleMessageHandler.java +++ b/Workspace/server/src/main/WEB-INF/classes/com/pqt/server/controller/SimpleMessageHandler.java @@ -139,8 +139,8 @@ public class SimpleMessageHandler implements IMessageHandler { fields.put(header_ref_query, "Compte utilisateur avec permission trop faible"); return new Message(MessageType.REFUSED_QUERY, serverStateService.getServer(), message.getEmitter(), message.getUser(), message, fields); } - if(queryHandlers.containsKey(message.getType())){ - return queryHandlers.get(message.getType()).execute(message); + if(manager.contains(message.getType())){ + return manager.getProcess(message.getType()).execute(message); } fields.put(header_err_query, "Type requĂȘte non pris en charge par ce serveur"); @@ -175,6 +175,10 @@ public class SimpleMessageHandler implements IMessageHandler { AccountLevel getLevel(MessageType messageType){ return levels.get(messageType); } + + public boolean contains(MessageType type) { + return processes.containsKey(type); + } } /**