m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/RemikMessage.java
blob: e4bc1b62eec1e904bbd58905bd85c2cd7dc4dae6 (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
package pl.edu.mimuw.cloudatlas.agent.messages;

import pl.edu.mimuw.cloudatlas.agent.modules.Module;
import pl.edu.mimuw.cloudatlas.agent.modules.ModuleType;
import pl.edu.mimuw.cloudatlas.agent.modules.Remik;

public abstract class RemikMessage extends AgentMessage {
    public enum Type {
        REQUEST_STATE
    }

    private Type type;

    public RemikMessage(String messageId, long timestamp, Type type) {
        super(messageId, ModuleType.RMI, timestamp);
        this.type = type;
    }

    public RemikMessage() {}

    public Type getType() {
        return type;
    }

    public void callMe(Module module) throws InterruptedException, Module.InvalidMessageType {
        module.handleTyped(this);
    }
}