blob: da4bd6fe8ac77f714bb5bd03cbf4e7b73e961408 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package pl.edu.mimuw.cloudatlas.agent.modules;
import pl.edu.mimuw.cloudatlas.agent.messages.AgentMessage;
import java.util.TimerTask;
public abstract class TimerScheduledTask extends TimerTask {
protected TimerScheduler scheduler;
public abstract void run();
public void setScheduler(TimerScheduler scheduler) {
this.scheduler = scheduler;
}
protected void sendMessage(AgentMessage msg) throws InterruptedException {
this.scheduler.passMessageFromTask(msg);
}
}
|