org.schmant.task.template.process
Class ExtProcessSupport
java.lang.Object
org.schmant.task.template.process.ExtProcessSupport
public final class ExtProcessSupport
- extends Object
Class with static support methods for running external programs. The methods
defined in this class are meant to be used by classes that run external
programs but cannot inherit AbstractExtProcessTask
.
- Since:
- 0.5
- Author:
- Karl Gustafsson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_STDOUT_STRATEGY
public static final ProcessOutputStrategy DEFAULT_STDOUT_STRATEGY
DEFAULT_STDERR_STRATEGY
public static final ProcessOutputStrategy DEFAULT_STDERR_STRATEGY
getProcessSettings
public static ProcessSettings getProcessSettings(ExtProcessConfigured c)
- Get the settings for the external program.
- Parameters:
c
- A configuration object.
- Returns:
- The configuration for the program.
execAndWait
public static ProcessResult execAndWait(ProcessSettings ps,
ExtProcessConfigured c)
throws InterruptedException
- Run the program and return the result.
- Parameters:
ps
- The program settingsc
- The program configurable.
- Returns:
- The program result.
- Throws:
InterruptedException
- If the thread was interrupted.