m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages
diff options
context:
space:
mode:
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;
+ }
+}