Class ScriptExecServiceImpl

    • Constructor Detail

      • ScriptExecServiceImpl

        public ScriptExecServiceImpl()
    • Method Detail

      • create

        public ScriptExec create​(Map<String,​Object> args,
                                 Object parent,
                                 Threads threads,
                                 com.anrisoftware.resources.templates.external.TemplateResource templateResource,
                                 String name)
        Description copied from interface: ScriptExecFactory
        Create the script exec.
        Specified by:
        create in interface ScriptExecFactory
        Parameters:
        args - the Map arguments:
        • log the logger that logs the command output;
        • runCommands optionally, set to the RunCommands to record the command.
        • outString optionally, set to true to save the output in a String for later parsing, see ProcessTask.getOut();
        • errString optionally, set to true to save the error output in a String for later parsing, see ProcessTask.getErr(). Per default it is set to AbstractProcessExec.ERR_STRING_DEFAULT.
        • timeout optionally, set the timeout Duration;
        • destroyOnTimeout optionally, set to true to destroy the process on timeout;
        • checkExitCodes optionally, set to true to check the exit code(s) of the process;
        • exitCodes optionally, set an int-array of success exit codes;
        • exitCode optionally, set the success exit code of the process;
        parent - the Object parent script.
        threads - the Threads pool.
        templateResource - the TemplateResource.
        name - the String name.
        Returns:
        the ScriptExec.
      • start

        protected void start()