OTX-Runtime for Java  
OpenTestSystem.Otx.Runtime.Api.IRuntimeContext Interface Reference

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 ()
 Stops current execution.
 

Detailed Description

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.

Member Function Documentation

◆ Continue()

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
Exceptions.RuntimeExceptionThrows a RuntimeException if the runtime context cannot be continued.

◆ GetExecutionState()

ExecutionState OpenTestSystem.Otx.Runtime.Api.IRuntimeContext.GetExecutionState ( )

Gets ExecutionState of the runtime context.

Returns
The ExecutionState of the runtime context.

◆ GetExecutionTime()

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.

Returns
Execution duration in milliseconds.

◆ GetName()

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.

Returns
Name of RuntimeContext.

◆ GetOtxException()

OtxException OpenTestSystem.Otx.Runtime.Api.IRuntimeContext.GetOtxException ( )

Gets an OTX exception which is not handled inside OTX execution.

Returns
OTX Exception which was thrown by OTX-Runtime.

◆ GetProcedure()

IProcedure OpenTestSystem.Otx.Runtime.Api.IRuntimeContext.GetProcedure ( )

Gets Procedure which created this RuntimeContext by starting an execution.

Returns
Procedure which created this RuntimeContext.

◆ GetProcessId()

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.

Returns
The PID of the runner process.

◆ GetProcessMemory()

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.

Returns
Number of private bytes of the runner process.

◆ GetRuntimeException()

RuntimeException OpenTestSystem.Otx.Runtime.Api.IRuntimeContext.GetRuntimeException ( )

Gets an runtime exception which was thrown by OTX-Runtime due to a bug.

Returns
Exception which was thrown by OTX-Runtime.

◆ GetRuntimeId()

long OpenTestSystem.Otx.Runtime.Api.IRuntimeContext.GetRuntimeId ( )

Gets an unique id of the procedure execution context.

Returns
An unique id of the procedure execution context.

◆ HasOtxException()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeContext.HasOtxException ( )

Checks if the execution was terminated by an OTX Exception.

Returns
true there is OTX Exception; otherwise false.

◆ HasRuntimeException()

boolean OpenTestSystem.Otx.Runtime.Api.IRuntimeContext.HasRuntimeException ( )

Checks if the execution was terminated by an Exception.

Returns
true there is OTX-Runtime Exception; otherwise false.

◆ Pause()

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
Exceptions.RuntimeExceptionThrows a RuntimeException if the runtime context cannot be paused.

The documentation for this interface was generated from the following file: