diff options
author | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2020-01-09 22:41:11 +0100 |
---|---|---|
committer | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2020-01-09 22:41:11 +0100 |
commit | 98ec32765bd769b457561dd9fdf34fee544dd54b (patch) | |
tree | e90b3bb4e551d4edbcd9629b4dceaada56a59f53 /src/main/java/pl/edu/mimuw/cloudatlas/agent/messages | |
parent | 4ba7fa9be088650dc32dbabaa1ef2ea47681ec81 (diff) |
Send info from gossip initiator
Diffstat (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/messages')
-rw-r--r-- | src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/GossipGirlMessage.java | 3 | ||||
-rw-r--r-- | src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/QueryMessage.java | 29 |
2 files changed, 31 insertions, 1 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 2016447..508fe88 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 @@ -8,7 +8,8 @@ public abstract class GossipGirlMessage extends AgentMessage { ATTRIBUTES, HEJKA, INITIATE, - NO_CO_TAM + NO_CO_TAM, + QUERY } private Type type; diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/QueryMessage.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/QueryMessage.java new file mode 100644 index 0000000..2b3b064 --- /dev/null +++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/QueryMessage.java @@ -0,0 +1,29 @@ +package pl.edu.mimuw.cloudatlas.agent.messages; + +import pl.edu.mimuw.cloudatlas.model.Attribute; +import pl.edu.mimuw.cloudatlas.model.ValueQuery; + +public class QueryMessage extends RemoteGossipGirlMessage { + private Attribute name; + private ValueQuery query; + private long receiverGossipId; + + public QueryMessage(String messageId, long timestamp, Attribute name, ValueQuery query, long receiverGossipId) { + super(messageId, timestamp, Type.QUERY); + this.name = name; + this.query = query; + this.receiverGossipId = receiverGossipId; + } + + public Attribute getName() { + return name; + } + + public ValueQuery getQuery() { + return query; + } + + public long getReceiverGossipId() { + return receiverGossipId; + } +} |