diff options
author | Martin <marcin.j.chrzanowski@gmail.com> | 2020-01-10 16:26:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-10 16:26:00 +0100 |
commit | 3e3677a34ab63d05cbc7a3c45dca98a47fbac77f (patch) | |
tree | abe2cc377960b47626bd38350c470104d1a1c1d2 /src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/GossipGirlMessage.java | |
parent | 60025accad672dac8228b7bac1006126223e2e58 (diff) | |
parent | 98ec32765bd769b457561dd9fdf34fee544dd54b (diff) |
Merge pull request #87 from m-chrzan/gossip-girl
Begin gossip girl
Diffstat (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/GossipGirlMessage.java')
-rw-r--r-- | src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/GossipGirlMessage.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/GossipGirlMessage.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/GossipGirlMessage.java new file mode 100644 index 0000000..508fe88 --- /dev/null +++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/GossipGirlMessage.java @@ -0,0 +1,29 @@ +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 GossipGirlMessage extends AgentMessage { + public enum Type { + ATTRIBUTES, + HEJKA, + INITIATE, + NO_CO_TAM, + QUERY + } + + private Type type; + + public GossipGirlMessage(String messageId, long timestamp, Type type) { + super(messageId, ModuleType.GOSSIP, timestamp); + this.type = type; + } + + public Type getType() { + return type; + } + + public void callMe(Module module) throws InterruptedException, Module.InvalidMessageType { + module.handleTyped(this); + } +} |