Class DefaultProcessExecutor

  • All Implemented Interfaces:
    ProcessExecutor

    public abstract class DefaultProcessExecutor
    extends java.lang.Object
    implements ProcessExecutor
    Default process executor.
    • Constructor Detail

      • DefaultProcessExecutor

        public DefaultProcessExecutor​(ProcessConfiguration processConfiguration)
        Default constructor.
        Parameters:
        processConfiguration - process configuration
    • Method Detail

      • getStdOutInputStream

        public java.io.InputStream getStdOutInputStream()
        Description copied from interface: ProcessExecutor
        Get process standard output stream.
        Specified by:
        getStdOutInputStream in interface ProcessExecutor
        Returns:
        Returns InputStream provides process standard output
      • getStdErrInputStream

        public java.io.InputStream getStdErrInputStream()
        Description copied from interface: ProcessExecutor
        Get process standard error stream.
        Specified by:
        getStdErrInputStream in interface ProcessExecutor
        Returns:
        Returns InputStream provides process standard error
      • getExecutor

        protected java.util.concurrent.Executor getExecutor()
      • getLogger

        protected java.util.Optional<org.slf4j.Logger> getLogger()
      • getExecutionId

        public long getExecutionId()
      • getStdIn

        protected java.util.Optional<java.io.InputStream> getStdIn()
      • getEnvVariables

        protected java.util.Map<java.lang.String,​java.lang.String> getEnvVariables()
      • getWorkDirectory

        protected java.util.Optional<java.lang.String> getWorkDirectory()
      • getUnmaskedCommandAndArguments

        protected java.util.List<java.lang.String> getUnmaskedCommandAndArguments​(java.lang.Object... commandAndArguments)
        Get command line and arguments to execute. Contains unmasked values.
        Parameters:
        commandAndArguments - command and arguments to execute. If process is already configured with command line/arguments then given arguments will be added to the command arguments
        Returns:
        Returns unmasked command line and argument to execute
      • getMaskedCommandAndArguments

        protected java.util.List<java.lang.String> getMaskedCommandAndArguments​(java.lang.Object... commandAndArguments)
      • dumpCommandAndArguments

        protected void dumpCommandAndArguments​(java.lang.Object... commandAndArguments)
      • close

        protected void close()
      • closeResource

        protected void closeResource​(java.io.Closeable stream)