From a07c25266dc18f9ff3f0a23a8157fc478cdf5299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Grodzi=C5=84ska?= Date: Sat, 11 Jan 2020 16:36:12 +0100 Subject: Add setting fallback contacts --- .../cloudatlas/agent/messages/StanikMessage.java | 3 ++- .../agent/messages/UpdateContactsMessage.java | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/UpdateContactsMessage.java (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/messages') 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 contacts; + + public UpdateContactsMessage(String messageId, long timestamp, Set contacts) { + super(messageId, timestamp, Type.UPDATE_CONTACTS); + this.contacts = contacts; + } + + public UpdateContactsMessage() {} + + public Set getContacts() { + return contacts; + } +} -- cgit v1.2.3