blob: fc57ca4cee3b368a8b9c05bb58404785910ae9ef (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
package events.implementations;
import events.VSAbstractEvent;
import events.VSCopyableEvent;
import simulator.VSMain;
/**
* The class VSProcessRecoverEvent. This event makes a process to recover if
* it is crashed.
*
* @author Paul C. Buetow
*/
public class VSProcessRecoverEvent extends VSAbstractEvent
implements VSCopyableEvent {
@Override
public boolean isProcessRecoverEvent() {
return true;
}
@Override
public int getEventPriority() {
return PRIORITY_HIGHEST;
}
/* (non-Javadoc)
* @see events.VSCopyableEvent#initCopy(events.VSAbstractEvent)
*/
public void initCopy(VSAbstractEvent copy) {
}
/* (non-Javadoc)
* @see events.VSAbstractEvent#onInit()
*/
public void onInit() {
setClassname(getClass().toString());
}
/* (non-Javadoc)
* @see events.VSAbstractEvent#createShortname()()
*/
protected String createShortname(String savedShortname) {
return VSMain.prefs.getString("lang.process.recover");
}
/* (non-Javadoc)
* @see events.VSAbstractEvent#onStart()
*/
public void onStart() {
if (process.isCrashed()) {
process.isCrashed(false);
log(prefs.getString("lang.recovered"));
}
}
}
|