Package nl.vpro.util

Class CommandExecutorImpl

java.lang.Object
nl.vpro.util.CommandExecutorImpl
All Implemented Interfaces:
CommandExecutor

public class CommandExecutorImpl extends Object implements CommandExecutor
Wrapper around ProcessorBuilder It makes calling that somewhat simpler and also implements an interface, for easier mocking in test cases. It supports a timeout, for implicit killing the process if it takes too long. It also can wrap stderr to log that as errors.
Since:
1.6
Author:
Michiel Meeuwissen
  • Constructor Details

    • CommandExecutorImpl

      public CommandExecutorImpl(String c)
    • CommandExecutorImpl

      public CommandExecutorImpl(File f)
    • CommandExecutorImpl

      public CommandExecutorImpl(String binary, File workdir)
    • CommandExecutorImpl

      public CommandExecutorImpl(String binary, File workdir, Duration processTimeout)
    • CommandExecutorImpl

      public CommandExecutorImpl(File f, File workdir)
  • Method Details