m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu/mimuw/cloudatlas/agent/message
diff options
context:
space:
mode:
authorMagdalena GrodziƄska <mag.grodzinska@gmail.com>2019-12-23 19:19:30 +0100
committerGitHub <noreply@github.com>2019-12-23 19:19:30 +0100
commit0949c9d56c595c0e253e6a35604fb2b9af46f82a (patch)
tree7f573d76b1c89c1165513d90ecd82694e849e4da /src/main/java/pl/edu/mimuw/cloudatlas/agent/message
parent651c2b76ff3db39cefd1542d6f4c19d8686dfb85 (diff)
parent7a104ca7eeb0d312bc76d2393495387079032aed (diff)
Merge pull request #67 from m-chrzan/event_bus
Event bus
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.java8
1 files changed, 8 insertions, 0 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 ab24f48..6e8f51c 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
@@ -1,5 +1,7 @@
package pl.edu.mimuw.cloudatlas.agent.message;
+import pl.edu.mimuw.cloudatlas.agent.Agent;
+
public class AgentMessage {
public enum AgentModule {
@@ -23,6 +25,12 @@ public class AgentMessage {
this.timestamp = timestamp;
}
+ public AgentMessage(String messageId, AgentModule destinationModule) {
+ this.messageId = messageId;
+ this.destinationModule = destinationModule;
+ this.timestamp = System.currentTimeMillis() / 1000L;
+ }
+
public String getMessageId() {
return messageId;
}