From 8b076ed54b692381a3c1410b704bdad33ad5ca0b Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 26 Dec 2019 15:27:44 +0100 Subject: Refactor handle (#75) * Refactor passing messages to handler * Add RMIMessage skeleton * Handle RMI message in RMI module --- src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/RMI.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/RMI.java') diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/RMI.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/RMI.java index 452b214..1a86fc7 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/RMI.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/RMI.java @@ -2,7 +2,7 @@ package pl.edu.mimuw.cloudatlas.agent.modules; import pl.edu.mimuw.cloudatlas.agent.ApiImplementation; import pl.edu.mimuw.cloudatlas.agent.messages.AgentMessage; -import pl.edu.mimuw.cloudatlas.agent.messages.TimerSchedulerMessage; +import pl.edu.mimuw.cloudatlas.agent.messages.RMIMessage; import pl.edu.mimuw.cloudatlas.api.Api; import pl.edu.mimuw.cloudatlas.interpreter.Main; import pl.edu.mimuw.cloudatlas.model.ZMI; @@ -12,7 +12,7 @@ import java.rmi.registry.Registry; import java.rmi.server.UnicastRemoteObject; public class RMI extends Module { - public RMI(AgentMessage.AgentModule moduleType) { + public RMI(ModuleType moduleType) { super(moduleType); runRegistry(); } @@ -32,8 +32,6 @@ public class RMI extends Module { } } - @Override - public void handle(AgentMessage event) throws InterruptedException { - assert event.getDestinationModule() == event.getCorrectMessageType(); + public void handleTyped(RMIMessage event) throws InterruptedException { } } -- cgit v1.2.3