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 16:36:12 +0100
committerMagdalena Grodzińska <mag.grodzinska@gmail.com>2020-01-11 16:36:12 +0100
commita07c25266dc18f9ff3f0a23a8157fc478cdf5299 (patch)
treeb7062c202f2a054d3b9ac69888519dd634190b66 /src/main/java/pl/edu/mimuw/cloudatlas/agent/messages
parentc125370268544a1321aaa2152e200b5a74664880 (diff)
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;
+ }
+}