@OpenApiAll public final class SimulationManager extends java.lang.Object
Constructor and Description |
---|
SimulationManager() |
Modifier and Type | Method and Description |
---|---|
static SimulationSession |
execute(Element element)
The utility method for executing the specific element.
|
static SimulationSession |
execute(Element element,
java.lang.Boolean isMainSession,
java.lang.Boolean start)
The utility method for executing the specific element with additional flags.
|
static SimulationSession |
execute(Element element,
java.lang.Boolean isMainSession,
java.lang.Boolean start,
java.lang.Boolean isSilent)
The utility method for executing the specific element with additional flags.
|
static SimulationSession |
getRefSession(fUML.Semantics.Classes.Kernel.Object_ object)
Get the referenced session of the specified object.
|
static fUML.Semantics.Classes.Kernel.Object_ |
getRootContext(SimulationSession session)
Get the root context of the running session.
|
static boolean |
isSilentSimulation(SimulationSession session)
Check the simulation runt in silent mode or not.
|
static void |
logConsoleDebug(Project project,
java.lang.String message)
Log the specified message to the simulation console with "DEBUG" log level.
|
static void |
logConsoleError(Project project,
java.lang.String message)
Log the specified message to the simulation console with "ERROR" log level.
|
static void |
logConsoleInfo(Project project,
java.lang.String message)
Log the specified message to the simulation console with "INFO" log level.
|
static void |
logConsoleWarn(Project project,
java.lang.String message)
Log the specified message to the simulation console with "WARN" log level.
|
static void |
registerEngine(ExecutionEngineDescriptor engineDescriptor)
Registers an engine descriptor to the simulation framework.
|
static void |
registerExecutionListener(ExecutionListener listener)
Deprecated.
|
static void |
registerSimulationExecutionListener(SimulationExecutionListener listener)
Register the simulation execution listener.
|
static void |
terminateSession(SimulationSession session)
Terminate the running session.
|
public static void registerEngine(ExecutionEngineDescriptor engineDescriptor)
engineDescriptor
- an engine descriptor.public static SimulationSession execute(Element element)
element
- the elementpublic static SimulationSession execute(Element element, java.lang.Boolean isMainSession, java.lang.Boolean start)
element
- the element that be executedisMainSession
- execute with fUMLEngine or not. if this flag is null, it will check from the element
with the registered engine.start
- if this flag is true, it will auto start the session.public static SimulationSession execute(Element element, java.lang.Boolean isMainSession, java.lang.Boolean start, java.lang.Boolean isSilent)
element
- the element that be executedisMainSession
- execute with fUMLEngine or not. if this flag is null, it will check from the element
with the registered engine.start
- if this flag is true, it will auto start the session.isSilent
- execute the element in silent mode or notpublic static boolean isSilentSimulation(SimulationSession session)
session
- the simulation session.public static void terminateSession(SimulationSession session)
session
- the session being terminated@Deprecated public static void registerExecutionListener(ExecutionListener listener)
listener
- the registered execution listenerpublic static void registerSimulationExecutionListener(SimulationExecutionListener listener)
listener
- the registered simulation execution listenerpublic static void logConsoleDebug(Project project, java.lang.String message)
project
- a project of the running simulationmessage
- the specified messagepublic static void logConsoleInfo(Project project, java.lang.String message)
project
- a project of the running simulationmessage
- the specified messagepublic static void logConsoleWarn(Project project, java.lang.String message)
project
- a project of the running simulationmessage
- the specified messagepublic static void logConsoleError(Project project, java.lang.String message)
project
- a project of the running simulationmessage
- the specified messagepublic static SimulationSession getRefSession(fUML.Semantics.Classes.Kernel.Object_ object)
object
- a specified Object_public static fUML.Semantics.Classes.Kernel.Object_ getRootContext(SimulationSession session)
session
- the running session