diff options
author | Magdalena Grodzińska <mag.grodzinska@gmail.com> | 2020-01-10 19:06:26 +0100 |
---|---|---|
committer | Magdalena Grodzińska <mag.grodzinska@gmail.com> | 2020-01-10 19:06:26 +0100 |
commit | 1f87c2d319b2671bd2d61feb3a76d102059c4c52 (patch) | |
tree | c2575377b7edeb01b496e6b865b53c943083be8c /src/main/java/pl/edu/mimuw/cloudatlas/agent/messages | |
parent | 1b28c8a208c510183479e090f7b8c32f9dadd7c2 (diff) |
Make UDUP handle only gossip girl messages with its timestamps
Diffstat (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/messages')
3 files changed, 9 insertions, 5 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 index 508fe88..03525bb 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/GossipGirlMessage.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/GossipGirlMessage.java @@ -19,6 +19,8 @@ public abstract class GossipGirlMessage extends AgentMessage { this.type = type; } + public GossipGirlMessage() {}; + public Type getType() { return type; } diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/RemoteGossipGirlMessage.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/RemoteGossipGirlMessage.java index 0a3a868..4c223f5 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/RemoteGossipGirlMessage.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/RemoteGossipGirlMessage.java @@ -10,6 +10,8 @@ public class RemoteGossipGirlMessage extends GossipGirlMessage { super(messageId, timestamp, type); } + public RemoteGossipGirlMessage() {}; + public void setSentTimestamp(ValueTime sentTimestamp) { this.sentTimestamp = sentTimestamp; } diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/UDUPMessage.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/UDUPMessage.java index 3751b3c..b955340 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/UDUPMessage.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/UDUPMessage.java @@ -6,15 +6,15 @@ import pl.edu.mimuw.cloudatlas.model.ValueContact; public class UDUPMessage extends AgentMessage { private ValueContact contact; - private AgentMessage content; + private RemoteGossipGirlMessage content; - public UDUPMessage(String messageId, long timestamp, ValueContact contact, AgentMessage content) { + public UDUPMessage(String messageId, long timestamp, ValueContact contact, RemoteGossipGirlMessage content) { super(messageId, ModuleType.UDP, timestamp); this.contact = contact; this.content = content; } - public UDUPMessage(String messageId, ValueContact contact, AgentMessage content) { + public UDUPMessage(String messageId, ValueContact contact, RemoteGossipGirlMessage content) { super(messageId, ModuleType.UDP); this.contact = contact; this.content = content; @@ -27,11 +27,11 @@ public class UDUPMessage extends AgentMessage { module.handleTyped(this); } - public AgentMessage getContent() { + public RemoteGossipGirlMessage getContent() { return content; } - public void setContent(AgentMessage content) { + public void setContent(RemoteGossipGirlMessage content) { this.content = content; } |