Class OsProcessWrapper


  • public class OsProcessWrapper
    extends java.lang.Object
    A 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
      void killAllProcesses()
      Kill all running OS processes which are not marked as daemon.
      OsProcess newInstance​(java.lang.String[] commandArgs)
      Get a new instance of an OS process.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 context
        executorConsoleLog - 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)