m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages
diff options
context:
space:
mode:
authorMagdalena GrodziƄska <mag.grodzinska@gmail.com>2020-01-11 17:00:26 +0100
committerGitHub <noreply@github.com>2020-01-11 17:00:26 +0100
commit5de908b8a0e15c7d71dadf0f4314c12b1429ac6c (patch)
treeb7062c202f2a054d3b9ac69888519dd634190b66 /src/main/java/pl/edu/mimuw/cloudatlas/agent/messages
parentc125370268544a1321aaa2152e200b5a74664880 (diff)
parenta07c25266dc18f9ff3f0a23a8157fc478cdf5299 (diff)
Merge pull request #97 from m-chrzan/handle_contacts
Add setting fallback contacts
Diffstat (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/messages')
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/StanikMessage.java3
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/UpdateContactsMessage.java20
2 files changed, 22 insertions, 1 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/StanikMessage.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/StanikMessage.java
index 3daa5f9..d59acda 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/StanikMessage.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/StanikMessage.java
@@ -9,7 +9,8 @@ public abstract class StanikMessage extends AgentMessage {
REMOVE_ZMI,
SET_ATTRIBUTE,
UPDATE_ATTRIBUTES,
- UPDATE_QUERIES
+ UPDATE_QUERIES,
+ UPDATE_CONTACTS
}
private Type type;
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/UpdateContactsMessage.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/UpdateContactsMessage.java
new file mode 100644
index 0000000..227d213
--- /dev/null
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/UpdateContactsMessage.java
@@ -0,0 +1,20 @@
+package pl.edu.mimuw.cloudatlas.agent.messages;
+
+import java.util.Set;
+
+import pl.edu.mimuw.cloudatlas.model.ValueContact;
+
+public class UpdateContactsMessage extends StanikMessage {
+ private Set<ValueContact> contacts;
+
+ public UpdateContactsMessage(String messageId, long timestamp, Set<ValueContact> contacts) {
+ super(messageId, timestamp, Type.UPDATE_CONTACTS);
+ this.contacts = contacts;
+ }
+
+ public UpdateContactsMessage() {}
+
+ public Set<ValueContact> getContacts() {
+ return contacts;
+ }
+}