m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/StateMessage.java
blob: 759723b94241e1cd8243764f21757f00715f6eff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package pl.edu.mimuw.cloudatlas.agent.messages;

import java.util.Map;
import java.util.Map.Entry;

import pl.edu.mimuw.cloudatlas.agent.modules.ModuleType;
import pl.edu.mimuw.cloudatlas.model.Attribute;
import pl.edu.mimuw.cloudatlas.model.ValueQuery;
import pl.edu.mimuw.cloudatlas.model.ValueTime;
import pl.edu.mimuw.cloudatlas.model.ZMI;

public class StateMessage extends ResponseMessage {
    private ZMI zmi;
    private Map<Attribute, Entry<ValueQuery, ValueTime>> queries;

    public StateMessage(String messageId, ModuleType destinationModule, long timestamp, long requestId, ZMI zmi, Map<Attribute, Entry<ValueQuery, ValueTime>> queries) {
        super(messageId, destinationModule, timestamp, Type.STATE, requestId);
        this.zmi = zmi;
        this.queries = queries;
    }

    public StateMessage() {}

    public ZMI getZMI() {
        return zmi;
    }

    public Map<Attribute, Entry<ValueQuery, ValueTime>> getQueries() {
        return queries;
    }
}