类 SystemCommandTasklet

    • 字段详细资料

      • logger

        protected static final org.apache.commons.logging.Log logger
    • 方法详细资料

      • setCommand

        public void setCommand​(java.lang.String command)
        参数:
        command - command to be executed in a separate system process
      • setEnvironmentParams

        public void setEnvironmentParams​(java.lang.String[] envp)
        参数:
        envp - environment parameter values, inherited from parent process when not set (or set to null).
      • setWorkingDirectory

        public void setWorkingDirectory​(java.lang.String dir)
        参数:
        dir - working directory of the spawned process, inherited from parent process when not set (or set to null).
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        指定者:
        afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBean
        抛出:
        java.lang.Exception
      • setTimeout

        public void setTimeout​(long timeout)
        Timeout in milliseconds.
        参数:
        timeout - upper limit for how long the execution of the external program is allowed to last.
      • setTerminationCheckInterval

        public void setTerminationCheckInterval​(long checkInterval)
        The time interval how often the tasklet will check for termination status.
        参数:
        checkInterval - time interval in milliseconds (1 second by default).
      • setTaskExecutor

        public void setTaskExecutor​(org.springframework.core.task.TaskExecutor taskExecutor)
        Sets the task executor that will be used to execute the system command NB! Avoid using a synchronous task executor
        参数:
        taskExecutor - instance of TaskExecutor.
      • setInterruptOnCancel

        public void setInterruptOnCancel​(boolean interruptOnCancel)
        If true tasklet will attempt to interrupt the thread executing the system command if setTimeout(long) has been exceeded or user interrupts the job. false by default
        参数:
        interruptOnCancel - boolean determines if process should be interrupted