OTX-Runtime for Java
|
|
Contains information of a Runner instance. More...
Inherited by OpenTestSystem.Otx.Runtime.Api.RuntimeContextBase.
Public Member Functions | |
void | Continue () |
An explicit paused procedure (via @pause()@ method and not implicit paused) continues its execution with the next activity. More... | |
ExecutionState | GetExecutionState () |
Gets ExecutionState of the runtime context. More... | |
long | GetExecutionTime () |
Get the total time of procedure execution in milliseconds. More... | |
String | GetName () |
Gets name of RuntimeContext. More... | |
OtxException | GetOtxException () |
Gets an OTX exception which is not handled inside OTX execution. More... | |
IProcedure | GetProcedure () |
Gets Procedure which created this RuntimeContext by starting an execution. More... | |
long | GetProcessId () |
Get the process Id of the runner process. More... | |
long | GetProcessMemory () |
Get the number of private bytes of the runner process. More... | |
RuntimeException | GetRuntimeException () |
Gets an runtime exception which was thrown by OTX-Runtime due to a bug. More... | |
long | GetRuntimeId () |
Gets an unique id of the procedure execution context. More... | |
boolean | HasOtxException () |
Checks if the execution was terminated by an OTX Exception. More... | |
boolean | HasRuntimeException () |
Checks if the execution was terminated by an Exception. More... | |
void | Pause () |
The runtime context pause its execution. More... | |
void | Stop () |
Changes the execution state of the runtime context immediately to Stopped. More... | |
Contains information of a Runner instance.
For each executed procedure a new Runner instance will be started and after finishing the execution the Runner instance will be deleted. A Runner can be executed inside an own process or inside the process of the application, see RuntimeManagerFactory. A RuntimeContext represents a Runner instance. It is unique and will be created at procedure execution, see Execute.
The RuntimeContext represents a project, see Project. The project can get via Procedure, Document and Package. Please note, that a player project can contain more than one project, see PlayerProject and each of this projects can have different project settings, see ProjectSettings.
void OpenTestSystem.Otx.Runtime.Api.IRuntimeContext.Continue | ( | ) |
An explicit paused procedure (via @pause()@ method and not implicit paused) continues its execution with the next activity.
Exceptions.RuntimeException | Throws a RuntimeException if the runtime context cannot be continued. |
ExecutionState OpenTestSystem.Otx.Runtime.Api.IRuntimeContext.GetExecutionState | ( | ) |
Gets ExecutionState of the runtime context.
long OpenTestSystem.Otx.Runtime.Api.IRuntimeContext.GetExecutionTime | ( | ) |
Get the total time of procedure execution in milliseconds.
The value is the time where the procedure execution is inside @ ExecutionState.Running . The time inside other states e.g. @ ExecutionState.Paused @ shall not be counted. Getting the value shall deliver the current value.
String OpenTestSystem.Otx.Runtime.Api.IRuntimeContext.GetName | ( | ) |
Gets name of RuntimeContext.
The name can be used to better distinguish the different OTX runners and/or clients of DiagManager inside the trace files. It can be set via the Execute method.
OtxException OpenTestSystem.Otx.Runtime.Api.IRuntimeContext.GetOtxException | ( | ) |
Gets an OTX exception which is not handled inside OTX execution.
IProcedure OpenTestSystem.Otx.Runtime.Api.IRuntimeContext.GetProcedure | ( | ) |
Gets Procedure which created this RuntimeContext by starting an execution.
long OpenTestSystem.Otx.Runtime.Api.IRuntimeContext.GetProcessId | ( | ) |
Get the process Id of the runner process.
The PID will only delivered if the @ ExecutionState @ is @ Running @ or @ Paused . In all other @ ExecutionState @ s -1 is returned.
long OpenTestSystem.Otx.Runtime.Api.IRuntimeContext.GetProcessMemory | ( | ) |
Get the number of private bytes of the runner process.
The value will be calculated inside the runner at the time the property is read. After the procedure execution is finished the value contains the number of private bytes direct before the ProcedureFinished event.
RuntimeException OpenTestSystem.Otx.Runtime.Api.IRuntimeContext.GetRuntimeException | ( | ) |
Gets an runtime exception which was thrown by OTX-Runtime due to a bug.
long OpenTestSystem.Otx.Runtime.Api.IRuntimeContext.GetRuntimeId | ( | ) |
Gets an unique id of the procedure execution context.
boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeContext.HasOtxException | ( | ) |
Checks if the execution was terminated by an OTX Exception.
boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeContext.HasRuntimeException | ( | ) |
Checks if the execution was terminated by an Exception.
void OpenTestSystem.Otx.Runtime.Api.IRuntimeContext.Pause | ( | ) |
The runtime context pause its execution.
This means that all executing procedures will execute their current atomic node and then pause the execution until it is continued or stopped.
Exceptions.RuntimeException | Throws a RuntimeException if the runtime context cannot be paused. |
void OpenTestSystem.Otx.Runtime.Api.IRuntimeContext.Stop | ( | ) |
Changes the execution state of the runtime context immediately to Stopped.
The execution completely stops when the ProcedureStopped event fires.
In Socket and Pipe mode, the runtime execution process is killed, and the ProcedureStopped event fires immediately.