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/StanikMessage.java | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/StanikMessage.java (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/StanikMessage.java') diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/StanikMessage.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/StanikMessage.java new file mode 100644 index 0000000..d2b3064 --- /dev/null +++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/StanikMessage.java @@ -0,0 +1,25 @@ +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 StanikMessage extends AgentMessage { + public enum Type { + GET_HIERARCHY + } + + private Type type; + + public StanikMessage(String messageId, long timestamp, Type type) { + super(messageId, ModuleType.STATE, timestamp); + this.type = type; + } + + public Type getType() { + return type; + } + + public void callMe(Module module) throws InterruptedException, Module.InvalidMessageType { + module.handleTyped(this); + } +} -- cgit v1.2.3