diff options
author | Magdalena Grodzińska <mag.grodzinska@gmail.com> | 2020-01-06 18:02:20 +0100 |
---|---|---|
committer | Magdalena Grodzińska <mag.grodzinska@gmail.com> | 2020-01-06 18:02:20 +0100 |
commit | 360cb66d187b64ae51c792d87d0d425e73b48d0a (patch) | |
tree | 09c3f664edb399e8806fd2a5fdf1e90f44f3daf4 /src/main/java/pl/edu/mimuw | |
parent | db22fe6c09a33c2cf5a7936442ccb7b8307ae84e (diff) |
Add udup module initialization
Diffstat (limited to 'src/main/java/pl/edu/mimuw')
-rw-r--r-- | src/main/java/pl/edu/mimuw/cloudatlas/agent/Agent.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/Agent.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/Agent.java index 0efa710..ef4f48d 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/Agent.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/Agent.java @@ -1,5 +1,8 @@ package pl.edu.mimuw.cloudatlas.agent; +import java.net.Inet4Address; +import java.net.InetAddress; +import java.net.UnknownHostException; import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry; import java.rmi.server.UnicastRemoteObject; @@ -12,14 +15,8 @@ import pl.edu.mimuw.cloudatlas.agent.NewApiImplementation; import pl.edu.mimuw.cloudatlas.agent.messages.RunQueriesMessage; import pl.edu.mimuw.cloudatlas.agent.messages.TimerSchedulerMessage; import pl.edu.mimuw.cloudatlas.agent.messages.UpdateAttributesMessage; +import pl.edu.mimuw.cloudatlas.agent.modules.*; import pl.edu.mimuw.cloudatlas.agent.modules.Module; -import pl.edu.mimuw.cloudatlas.agent.modules.ModuleType; -import pl.edu.mimuw.cloudatlas.agent.modules.Qurnik; -import pl.edu.mimuw.cloudatlas.agent.modules.Remik; -import pl.edu.mimuw.cloudatlas.agent.modules.Stanik; -import pl.edu.mimuw.cloudatlas.agent.modules.RecursiveScheduledTask; -import pl.edu.mimuw.cloudatlas.agent.modules.TimerScheduledTask; -import pl.edu.mimuw.cloudatlas.agent.modules.TimerScheduler; import pl.edu.mimuw.cloudatlas.api.Api; import pl.edu.mimuw.cloudatlas.interpreter.Main; import pl.edu.mimuw.cloudatlas.model.PathName; @@ -48,6 +45,11 @@ public class Agent { modules.put(ModuleType.RMI, new Remik()); modules.put(ModuleType.STATE, new Stanik()); modules.put(ModuleType.QUERY, new Qurnik()); + try { + modules.put(ModuleType.UDP, new UDUP(InetAddress.getByName("127.0.0.1"), 5988, 5000, 20000)); + } catch (UnknownHostException e) { + e.printStackTrace(); + } // TODO add modules as we implement them return modules; } |