From 0e9ed16b0a048266b56d1238bd7a8a31e59fdac5 Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Sun, 29 Dec 2019 19:12:48 +0100 Subject: Start running queries with Qurnik --- .../cloudatlas/agent/messages/QurnikMessage.java | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/QurnikMessage.java (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/QurnikMessage.java') diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/QurnikMessage.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/QurnikMessage.java new file mode 100644 index 0000000..0161a37 --- /dev/null +++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/QurnikMessage.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 QurnikMessage extends AgentMessage { + public enum Type { + RUN_QUERIES + } + + private Type type; + + public QurnikMessage(String messageId, long timestamp, Type type) { + super(messageId, ModuleType.QUERY, 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