Package io.quarkus.deployment.util
Class ProcessUtil
java.lang.Object
io.quarkus.deployment.util.ProcessUtil
Deprecated, for removal: This API element is subject to removal in a future version.
Utility for
Process related operations-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionstatic ProcesslaunchProcess(ProcessBuilder builder, boolean shouldRedirectIO) Deprecated, for removal: This API element is subject to removal in a future version.static ProcesslaunchProcessStreamStdOut(ProcessBuilder builder, boolean shouldRedirectIO) Deprecated, for removal: This API element is subject to removal in a future version.static voidstreamErrorTo(PrintStream printStream, Process process) Deprecated, for removal: This API element is subject to removal in a future version.static voidstreamErrorToSysErr(Process process) Deprecated, for removal: This API element is subject to removal in a future version.static voidstreamOutputToSysOut(Process process) Deprecated, for removal: This API element is subject to removal in a future version.static voidstreamToSysOutSysErr(Process process) Deprecated, for removal: This API element is subject to removal in a future version.This is a convenience method which internally calls both thestreamOutputToSysOut(Process)andstreamErrorToSysErr(Process)methods
-
Constructor Details
-
ProcessUtil
public ProcessUtil()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
launchProcess
public static Process launchProcess(ProcessBuilder builder, boolean shouldRedirectIO) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.Launches and returns aProcessbuilt from thebuilder. Before launching the process, this method checks if inherit IO is disabled and if so, streams both theSTDOUTandSTDERRof the launched process usingstreamToSysOutSysErr(Process). Else, it launches the process withProcessBuilder.inheritIO()- Parameters:
builder- The process buildershouldRedirectIO- WhetherProcessBuilder.Redirect.INHERITcan be used for launching the process- Returns:
- Returns the newly launched process
- Throws:
IOException
-
launchProcessStreamStdOut
public static Process launchProcessStreamStdOut(ProcessBuilder builder, boolean shouldRedirectIO) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.Launches and returns aProcessbuilt from thebuilder. Before launching the process, this method checks if inheritIO is disabled and if so, streams (only) theSTDOUTof the launched process usingstreamOutputToSysOut(Process)(Process)}. Else, it launches the process withProcessBuilder.inheritIO()- Parameters:
builder- The process buildershouldRedirectIO- WhetherProcessBuilder.Redirect.INHERITcan be used for launching the process- Returns:
- Returns the newly launched process
- Throws:
IOException
-
streamToSysOutSysErr
Deprecated, for removal: This API element is subject to removal in a future version.This is a convenience method which internally calls both thestreamOutputToSysOut(Process)andstreamErrorToSysErr(Process)methods- Parameters:
process- The process whose STDOUT and STDERR needs to be streamed.
-
streamOutputToSysOut
Deprecated, for removal: This API element is subject to removal in a future version.Streams theprocess'STDOUTto the current process'System.out stream. This creates and starts a thread to stream the contents. TheProcessis expected to have been started inProcessBuilder.Redirect.PIPEmode- Parameters:
process- The process whose STDOUT needs to be streamed.
-
streamErrorToSysErr
Deprecated, for removal: This API element is subject to removal in a future version.Streams theprocess'STDERRto the current process'System.err stream. This creates and starts a thread to stream the contents. TheProcessis expected to have been started inProcessBuilder.Redirect.PIPEmode- Parameters:
process- The process whose STDERR needs to be streamed.
-
streamErrorTo
Deprecated, for removal: This API element is subject to removal in a future version.Streams theprocess'STDERRto the givenprintStream. This creates and starts a thread to stream the contents. TheProcessis expected to have been started inProcessBuilder.Redirect.PIPEmode- Parameters:
process- The process whose STDERR needs to be streamed.
-
smallrye-common-processAPI instead.