summaryrefslogtreecommitdiff
path: root/src/main/java/simulator/engine/SimulationVisualizer.java
blob: 3151638b6ad78c7f76490c71b97f072a8cb1725a (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
56
57
58
59
60
61
package simulator.engine;

import core.VSInternalProcess;
import core.VSMessage;

/**
 * Interface for visualization components that observe simulation events.
 * Implementations can choose to display these events visually or ignore them.
 */
public interface SimulationVisualizer {
    
    /**
     * Called when a message is sent in the simulation.
     * @param message The message that was sent
     */
    void onMessageSent(VSMessage message);
    
    /**
     * Called when a process is added to the simulation.
     * @param process The process that was added
     */
    void onProcessAdded(VSInternalProcess process);
    
    /**
     * Called when a process is removed from the simulation.
     * @param process The process that was removed
     */
    void onProcessRemoved(VSInternalProcess process);
    
    /**
     * Called when the simulation time changes.
     * @param time The new time value
     */
    void onTimeChanged(long time);
    
    /**
     * Called when the simulation is reset.
     */
    void onSimulationReset();
    
    /**
     * Called when the simulation starts or resumes.
     */
    void onSimulationStarted();
    
    /**
     * Called when the simulation is paused.
     */
    void onSimulationPaused();
    
    /**
     * Called when the simulation finishes.
     */
    void onSimulationFinished();
    
    /**
     * Called when a process state changes.
     * @param process The process whose state changed
     */
    void onProcessStateChanged(VSInternalProcess process);
}