Interface ScriptExecFactory

  • All Known Subinterfaces:
    ScriptExecService
    All Known Implementing Classes:
    ScriptExecServiceImpl

    public interface ScriptExecFactory
    Factory to create the script exec.
    Since:
    2.3
    Author:
    Erwin Mueller, erwin.mueller@deventm.org
    • Method Detail

      • create

        ScriptExec create​(Map<String,​Object> args,
                          Object parent,
                          Threads threads,
                          com.anrisoftware.resources.templates.external.TemplateResource templateResource,
                          String name)
        Create the script exec.
        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.