m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/RMI.java
diff options
context:
space:
mode:
authorMartin <marcin.j.chrzanowski@gmail.com>2020-01-03 18:29:55 +0100
committerGitHub <noreply@github.com>2020-01-03 18:29:55 +0100
commit9be545d6f2609d5fe8143a1964d44f6eee588ea2 (patch)
treef0bb8d159249e9ddf328e92d7fb5eda10122ab3b /src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/RMI.java
parentfda20e7aa496926d4f4d78921925025040414d9b (diff)
parentec2da92e9636e219f5ad7caa73c9334dae12e5b1 (diff)
Merge pull request #83 from m-chrzan/remik
Use new modular architecture when implementing the RMI API
Diffstat (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/RMI.java')
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/RMI.java37
1 files changed, 0 insertions, 37 deletions
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
deleted file mode 100644
index 1a86fc7..0000000
--- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/RMI.java
+++ /dev/null
@@ -1,37 +0,0 @@
-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.RMIMessage;
-import pl.edu.mimuw.cloudatlas.api.Api;
-import pl.edu.mimuw.cloudatlas.interpreter.Main;
-import pl.edu.mimuw.cloudatlas.model.ZMI;
-
-import java.rmi.registry.LocateRegistry;
-import java.rmi.registry.Registry;
-import java.rmi.server.UnicastRemoteObject;
-
-public class RMI extends Module {
- public RMI(ModuleType moduleType) {
- super(moduleType);
- runRegistry();
- }
-
- public void runRegistry() {
- try {
- ZMI root = Main.createTestHierarchy2();
- ApiImplementation api = new ApiImplementation(root);
- Api apiStub =
- (Api) UnicastRemoteObject.exportObject(api, 0);
- Registry registry = LocateRegistry.getRegistry();
- registry.rebind("Api", apiStub);
- System.out.println("Agent: api bound");
- } catch (Exception e) {
- System.err.println("Agent registry initialization exception:");
- e.printStackTrace();
- }
- }
-
- public void handleTyped(RMIMessage event) throws InterruptedException {
- }
-}