diff options
author | Magdalena Grodzińska <mag.grodzinska@gmail.com> | 2019-12-22 16:36:58 +0100 |
---|---|---|
committer | Magdalena Grodzińska <mag.grodzinska@gmail.com> | 2019-12-22 16:36:58 +0100 |
commit | 0901262bb161249baf3559a20b114ffce49a1028 (patch) | |
tree | cad537732585cc284bba9792dce6a05d3ff74a25 /src/main/java/pl/edu/mimuw/cloudatlas/agent/message | |
parent | 0dc558a604dc3677f4f39503f84936a49e32d1de (diff) |
Separate requestId and messageId
Diffstat (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/message')
-rw-r--r-- | src/main/java/pl/edu/mimuw/cloudatlas/agent/message/AgentMessage.java | 14 | ||||
-rw-r--r-- | src/main/java/pl/edu/mimuw/cloudatlas/agent/message/TimerSchedulerMessage.java | 18 |
2 files changed, 19 insertions, 13 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/message/AgentMessage.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/message/AgentMessage.java index 8afe5be..ab24f48 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/message/AgentMessage.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/message/AgentMessage.java @@ -13,22 +13,22 @@ public class AgentMessage { QUERY } - private String requestId; + private String messageId; private AgentModule destinationModule; private long timestamp; - public AgentMessage(String requestId, AgentModule destinationModule, long timestamp) { - this.requestId = requestId; + public AgentMessage(String messageId, AgentModule destinationModule, long timestamp) { + this.messageId = messageId; this.destinationModule = destinationModule; this.timestamp = timestamp; } - public String getRequestId() { - return requestId; + public String getMessageId() { + return messageId; } - public void setRequestId(String requestId) { - this.requestId = requestId; + public void setMessageId(String messageId) { + this.messageId = messageId; } public AgentModule getDestinationModule() { diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/message/TimerSchedulerMessage.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/message/TimerSchedulerMessage.java index 76d6f8c..9743533 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/message/TimerSchedulerMessage.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/message/TimerSchedulerMessage.java @@ -3,12 +3,14 @@ package pl.edu.mimuw.cloudatlas.agent.message; import java.util.TimerTask; public class TimerSchedulerMessage extends AgentMessage { - long delay; - long baseTime; - TimerTask task; - - public TimerSchedulerMessage(String requestId, AgentModule destinationModule, long timestamp, long delay, long baseTime, TimerTask task) { - super(requestId, destinationModule, timestamp); + private String requestId; + private long delay; + private long baseTime; + private TimerTask task; + + public TimerSchedulerMessage(String messageId, AgentModule destinationModule, long timestamp, String requestId, long delay, long baseTime, TimerTask task) { + super(messageId, destinationModule, timestamp); + this.requestId = requestId; this.delay = delay; this.baseTime = baseTime; this.task = task; @@ -37,4 +39,8 @@ public class TimerSchedulerMessage extends AgentMessage { public void setTask(TimerTask task) { this.task = task; } + + public String getRequestId() { return requestId; } + + public void setRequestId(String requestId) { this.requestId = requestId; } } |