Package io.jans.util.process
Class ProcessHelper
java.lang.Object
io.jans.util.process.ProcessHelper
Utility to execute external processes
- Author:
- Yuriy Movchan Date: 11.22.2010
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanexecuteProgram(String programPath, boolean executeInBackground, int successExitValue, OutputStream outputStream) static booleanexecuteProgram(String programPath, String workingDirectory, boolean executeInBackground, int successExitValue, OutputStream outputStream) static booleanexecuteProgram(org.apache.commons.exec.CommandLine commandLine, boolean executeInBackground, int successExitValue, OutputStream outputStream) static io.jans.util.process.ProcessHelper.PrintResultHandlerexecuteProgram(org.apache.commons.exec.CommandLine commandLine, long printJobTimeout, boolean printInBackground, int successExitValue, org.apache.commons.exec.ExecuteStreamHandler streamHandler) static booleanexecuteProgram(org.apache.commons.exec.CommandLine commandLine, String workingDirectory, boolean executeInBackground, int successExitValue, OutputStream outputStream) static io.jans.util.process.ProcessHelper.PrintResultHandlerexecuteProgram(org.apache.commons.exec.CommandLine commandLine, String workingDirectory, long printJobTimeout, boolean printInBackground, int successExitValue, org.apache.commons.exec.ExecuteStreamHandler streamHandler)
-
Method Details
-
executeProgram
public static boolean executeProgram(String programPath, boolean executeInBackground, int successExitValue, OutputStream outputStream) -
executeProgram
public static boolean executeProgram(String programPath, String workingDirectory, boolean executeInBackground, int successExitValue, OutputStream outputStream) -
executeProgram
public static boolean executeProgram(org.apache.commons.exec.CommandLine commandLine, boolean executeInBackground, int successExitValue, OutputStream outputStream) -
executeProgram
public static boolean executeProgram(org.apache.commons.exec.CommandLine commandLine, String workingDirectory, boolean executeInBackground, int successExitValue, OutputStream outputStream) -
executeProgram
public static io.jans.util.process.ProcessHelper.PrintResultHandler executeProgram(org.apache.commons.exec.CommandLine commandLine, long printJobTimeout, boolean printInBackground, int successExitValue, org.apache.commons.exec.ExecuteStreamHandler streamHandler) throws IOException - Parameters:
printJobTimeout- the printJobTimeout (ms) before the watchdog terminates the print processprintInBackground- printing done in the background or blockingstreamHandler-- Returns:
- a print result handler (implementing a future)
- Throws:
IOException- the test failed
-
executeProgram
public static io.jans.util.process.ProcessHelper.PrintResultHandler executeProgram(org.apache.commons.exec.CommandLine commandLine, String workingDirectory, long printJobTimeout, boolean printInBackground, int successExitValue, org.apache.commons.exec.ExecuteStreamHandler streamHandler) throws IOException - Parameters:
printJobTimeout- the printJobTimeout (ms) before the watchdog terminates the print processprintInBackground- printing done in the background or blockingstreamHandler-- Returns:
- a print result handler (implementing a future)
- Throws:
IOException- the test failed
-