Package io.joshworks.snappy.maven.tools
Class RunProcess
- java.lang.Object
-
- io.joshworks.snappy.maven.tools.RunProcess
-
public class RunProcess extends java.lang.ObjectUtility used to run a process.- Since:
- 1.1.0
- Author:
- Phillip Webb, Dave Syer, Andy Wilkinson, Stephane Nicoll
-
-
Constructor Summary
Constructors Constructor Description RunProcess(java.lang.String... command)
-
Method Summary
Modifier and Type Method Description java.lang.ProcessgetRunningProcess()Return the running process.booleanhandleSigInt()Return if the process was stopped.booleanhasJustEnded()voidkill()Kill this process.intrun(boolean waitForProcess, java.lang.String... args)protected intrun(boolean waitForProcess, java.util.Collection<java.lang.String> args)
-
-
-
Method Detail
-
run
public int run(boolean waitForProcess, java.lang.String... args) throws java.io.IOException- Throws:
java.io.IOException
-
run
protected int run(boolean waitForProcess, java.util.Collection<java.lang.String> args) throws java.io.IOException- Throws:
java.io.IOException
-
getRunningProcess
public java.lang.Process getRunningProcess()
Return the running process.- Returns:
- the process or
null
-
handleSigInt
public boolean handleSigInt()
Return if the process was stopped.- Returns:
trueif stopped
-
kill
public void kill()
Kill this process.
-
hasJustEnded
public boolean hasJustEnded()
-
-