public class ProcessExecutionHandlerSync extends ProcessExecutionHandlerDefault
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
ProcessExecutionHandlerSync(CountDownLatch latch,
ExecutionOutputStrategy executionOutputStrategy) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getErrLines() |
protected ExecutionOutputStrategy |
getExecutionOutputStrategy() |
Integer |
getExitCode() |
protected CountDownLatch |
getLatch() |
Exception |
getLaunchException() |
List<String> |
getOutLines() |
SyncExecutionResult |
getSyncExecutionResult() |
boolean |
isTimeoutException() |
void |
onExit(int exitCode)
Called when the execution process exits
|
void |
onLaunchException(Exception ex)
Called if an exception occured during the launch
of the program.
|
void |
onSystemErr(String line)
Called when a line is written to the standard
errors by the created process.
|
void |
onSystemOut(String line)
Called when a line is written to the standard
output by the created process.
|
void |
onTimeoutException()
Called if the execution of the program
exceeds the specified timeout.
|
getProcess, getProcessKiller, isKillingRequested, isProcessAlive, killProcess, onEnd, setKillingRequested, setProcessAndProcessKiller, waitForPortOpenpublic ProcessExecutionHandlerSync(CountDownLatch latch, ExecutionOutputStrategy executionOutputStrategy)
latch - to be decremented when the process
exits or when an error occurs.protected CountDownLatch getLatch()
protected ExecutionOutputStrategy getExecutionOutputStrategy()
public Integer getExitCode()
public Exception getLaunchException()
public boolean isTimeoutException()
public void onExit(int exitCode)
ProcessExecutionHandlerDefaultonExit in interface ProcessExecutionHandleronExit in class ProcessExecutionHandlerDefaultpublic void onLaunchException(Exception ex)
ProcessExecutionHandleronLaunchException in interface ProcessExecutionHandleronLaunchException in class ProcessExecutionHandlerDefaultpublic void onTimeoutException()
ProcessExecutionHandleronTimeoutException in interface ProcessExecutionHandleronTimeoutException in class ProcessExecutionHandlerDefaultpublic void onSystemOut(String line)
ProcessExecutionHandleronSystemOut in interface ProcessExecutionHandleronSystemOut in class ProcessExecutionHandlerDefaultpublic void onSystemErr(String line)
ProcessExecutionHandleronSystemErr in interface ProcessExecutionHandleronSystemErr in class ProcessExecutionHandlerDefaultpublic SyncExecutionResult getSyncExecutionResult()
Copyright © 2019. All rights reserved.