From 219431065b335fdf250394ba66da8220d9bb868f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Grodzi=C5=84ska?= Date: Mon, 23 Dec 2019 19:54:24 +0100 Subject: Rename messages package --- .../agent/messages/TimerSchedulerMessage.java | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/TimerSchedulerMessage.java (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/TimerSchedulerMessage.java') diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/TimerSchedulerMessage.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/TimerSchedulerMessage.java new file mode 100644 index 0000000..23ec700 --- /dev/null +++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/TimerSchedulerMessage.java @@ -0,0 +1,46 @@ +package pl.edu.mimuw.cloudatlas.agent.messages; + +import java.util.TimerTask; + +public class TimerSchedulerMessage extends AgentMessage { + 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; + } + + public long getDelay() { + return delay; + } + + public void setDelay(long delay) { + this.delay = delay; + } + + public long getBaseTime() { + return baseTime; + } + + public void setBaseTime(long baseTime) { + this.baseTime = baseTime; + } + + public TimerTask getTask() { + return task; + } + + public void setTask(TimerTask task) { + this.task = task; + } + + public String getRequestId() { return requestId; } + + public void setRequestId(String requestId) { this.requestId = requestId; } +} -- cgit v1.2.3 From 6bd93c4fc80624eb83e9a1eb9b93e5781a796505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Grodzi=C5=84ska?= Date: Mon, 23 Dec 2019 23:27:01 +0100 Subject: Fix agent message type checks --- .../edu/mimuw/cloudatlas/agent/messages/TimerSchedulerMessage.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/TimerSchedulerMessage.java') diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/TimerSchedulerMessage.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/TimerSchedulerMessage.java index 23ec700..9a558b7 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/TimerSchedulerMessage.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/TimerSchedulerMessage.java @@ -43,4 +43,9 @@ public class TimerSchedulerMessage extends AgentMessage { public String getRequestId() { return requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } + + @Override + public AgentModule getCorrectMessageType() { + return AgentModule.TIMER_SCHEDULER; + } } -- cgit v1.2.3 From 26c750550b9fa6bdbebc8acbb39a34281205c140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Grodzi=C5=84ska?= Date: Wed, 25 Dec 2019 12:53:39 +0100 Subject: Fix task type in timer message --- .../agent/messages/TimerSchedulerMessage.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/TimerSchedulerMessage.java') diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/TimerSchedulerMessage.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/TimerSchedulerMessage.java index 9a558b7..333b381 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/TimerSchedulerMessage.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/TimerSchedulerMessage.java @@ -1,14 +1,20 @@ package pl.edu.mimuw.cloudatlas.agent.messages; -import java.util.TimerTask; +import pl.edu.mimuw.cloudatlas.agent.modules.TimerScheduledTask; public class TimerSchedulerMessage extends AgentMessage { 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) { + private TimerScheduledTask task; + + public TimerSchedulerMessage(String messageId, + AgentModule destinationModule, + long timestamp, + String requestId, + long delay, + long baseTime, + TimerScheduledTask task) { super(messageId, destinationModule, timestamp); this.requestId = requestId; this.delay = delay; @@ -32,11 +38,11 @@ public class TimerSchedulerMessage extends AgentMessage { this.baseTime = baseTime; } - public TimerTask getTask() { + public TimerScheduledTask getTask() { return task; } - public void setTask(TimerTask task) { + public void setTask(TimerScheduledTask task) { this.task = task; } -- cgit v1.2.3