Class OsProcessWrapper
- java.lang.Object
-
- com.dkfqs.measuringagent.javascript.executor.OsProcessWrapper
-
public class OsProcessWrapper extends java.lang.ObjectA wrapper to support starting of OS processes. Note that all started (and running) OS processes which not are not marked as daemon are killed after script execution.
-
-
Constructor Summary
Constructors Constructor Description OsProcessWrapper(com.dkfqs.measuringagent.javascript.JavaScriptRhinoTestJobExecutorContext testJobExecutorContext, com.dkfqs.measuringagent.javascript.executor.ExecutorConsoleLog executorConsoleLog)Create a new instance of this wrapper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidkillAllProcesses()Kill all running OS processes which are not marked as daemon.OsProcessnewInstance(java.lang.String[] commandArgs)Get a new instance of an OS process.
-
-
-
Constructor Detail
-
OsProcessWrapper
public OsProcessWrapper(com.dkfqs.measuringagent.javascript.JavaScriptRhinoTestJobExecutorContext testJobExecutorContext, com.dkfqs.measuringagent.javascript.executor.ExecutorConsoleLog executorConsoleLog)Create a new instance of this wrapper.- Parameters:
testJobExecutorContext- the test job executor contextexecutorConsoleLog- the console log
-
-
Method Detail
-
newInstance
public OsProcess newInstance(java.lang.String[] commandArgs) throws java.io.IOException
Get a new instance of an OS process.- Parameters:
commandArgs- the command arguments- Returns:
- the new instance of the OS process
- Throws:
java.io.IOException- if the temporary directory of the portal server user id cannot be created- See Also:
JavaScriptRhinoTestJobExecutorContext.isJavaScriptStartOsProcessesEnabled(),JavaScriptRhinoTestJobExecutorContext.getJavaScriptStartOsProcessesMaxInstances()
-
killAllProcesses
public void killAllProcesses()
Kill all running OS processes which are not marked as daemon.- See Also:
OsProcess.setDaemon(boolean)
-
-