From afa32431d242d60471e5431d654784ee64b63bbf Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Fri, 27 Dec 2019 11:28:46 +0100 Subject: Begin Stanik impelementation * Get cloned hierarchy * Test on empty hierarchy --- .../cloudatlas/agent/messages/ResponseMessage.java | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/ResponseMessage.java (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/ResponseMessage.java') diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/ResponseMessage.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/ResponseMessage.java new file mode 100644 index 0000000..171cf07 --- /dev/null +++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/ResponseMessage.java @@ -0,0 +1,31 @@ +package pl.edu.mimuw.cloudatlas.agent.messages; + +import pl.edu.mimuw.cloudatlas.agent.modules.Module; +import pl.edu.mimuw.cloudatlas.agent.modules.ModuleType; + +public abstract class ResponseMessage extends AgentMessage { + public enum Type { + HIERARCHY + } + + Type type; + long requestId; + + public ResponseMessage(String messageId, ModuleType destinationModule, long timestamp, Type type, long requestId) { + super(messageId, destinationModule, timestamp); + this.type = type; + this.requestId = requestId; + } + + public void callMe(Module module) throws InterruptedException, Module.InvalidMessageType { + module.handleTyped(this); + } + + public long getRequestId() { + return requestId; + } + + public Type getType() { + return type; + } +} -- cgit v1.2.3 From af6f6f37403d0e23a09a6ba4476271c2a0eaf623 Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Sun, 29 Dec 2019 14:12:31 +0100 Subject: Include timestamped queries in state --- .../java/pl/edu/mimuw/cloudatlas/agent/messages/ResponseMessage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/ResponseMessage.java') diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/ResponseMessage.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/ResponseMessage.java index 171cf07..02b3337 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/ResponseMessage.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/ResponseMessage.java @@ -5,7 +5,7 @@ import pl.edu.mimuw.cloudatlas.agent.modules.ModuleType; public abstract class ResponseMessage extends AgentMessage { public enum Type { - HIERARCHY + STATE } Type type; -- cgit v1.2.3