From eb7fbbd08bb003a47d9788a9f6476695ab46b271 Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Tue, 31 Dec 2019 17:31:38 +0100 Subject: Add message to set a single attribute --- .../agent/messages/SetAttributeMessage.java | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/SetAttributeMessage.java (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/SetAttributeMessage.java') diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/SetAttributeMessage.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/SetAttributeMessage.java new file mode 100644 index 0000000..4888484 --- /dev/null +++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/SetAttributeMessage.java @@ -0,0 +1,37 @@ +package pl.edu.mimuw.cloudatlas.agent.messages; + +import pl.edu.mimuw.cloudatlas.agent.modules.ModuleType; +import pl.edu.mimuw.cloudatlas.model.Attribute; +import pl.edu.mimuw.cloudatlas.model.Value; +import pl.edu.mimuw.cloudatlas.model.ValueTime; + +public class SetAttributeMessage extends StanikMessage { + private String pathName; + private Attribute attribute; + private Value value; + private ValueTime updateTimestamp; + + public SetAttributeMessage(String messageId, long timestamp, String pathName, Attribute attribute, Value value, ValueTime updateTimestamp) { + super(messageId, timestamp, Type.SET_ATTRIBUTE); + this.pathName = pathName; + this.attribute = attribute; + this.value = value; + this.updateTimestamp = updateTimestamp; + } + + public String getPathName() { + return pathName; + } + + public Attribute getAttribute() { + return attribute; + } + + public Value getValue() { + return value; + } + + public ValueTime getUpdateTimestamp() { + return updateTimestamp; + } +} -- cgit v1.2.3