Class SSimulation
- java.lang.Object
-
- jadex.bridge.service.types.simulation.SSimulation
-
public class SSimulation extends java.lang.Object
Helper class for simulation control.
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
DEBUG_BLOCKERS
-
Constructor Summary
Constructors Constructor Description SSimulation()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
addBlocker(IFuture<?> adblock)
Add the future as simulation blocker, if currently in simulation mode.static Future<java.lang.Void>
block()
Create future as simulation blocker, if currently in simulation mode.static ServiceCall
debugBlocker()
Add caller stack to service call on debug.static boolean
isSimulating(IInternalAccess ia)
Check if running in (single platform) simulation.
-
-
-
Field Detail
-
DEBUG_BLOCKERS
public static final boolean DEBUG_BLOCKERS
- See Also:
- Constant Field Values
-
-
Method Detail
-
addBlocker
public static boolean addBlocker(IFuture<?> adblock)
Add the future as simulation blocker, if currently in simulation mode. Simulation blocking means the clock will not advance until the future is done. This allows synchronizing external threads (e.g. swing) with the simulation execution.
-
block
public static Future<java.lang.Void> block()
Create future as simulation blocker, if currently in simulation mode. Simulation blocking means the clock will not advance until the future is done. This allows synchronizing external threads (e.g. swing) with the simulation execution.- Returns:
- A future that has to be set to null for simulation to continue or null if not running in simulation mode.
-
isSimulating
public static boolean isSimulating(IInternalAccess ia)
Check if running in (single platform) simulation.
-
debugBlocker
public static ServiceCall debugBlocker()
Add caller stack to service call on debug.
-
-