public class CapturingProcessHandler extends OSProcessHandler
Modifier and Type | Class and Description |
---|---|
static class |
CapturingProcessHandler.Silent |
BaseOSProcessHandler.SimpleOutputReader
myCharset, myCommandLine, myPresentableName, myProcess, myWaitFor
SILENTLY_DESTROY_ON_CLOSE, TERMINATION_REQUESTED
Constructor and Description |
---|
CapturingProcessHandler(GeneralCommandLine commandLine) |
CapturingProcessHandler(java.lang.Process process)
Deprecated.
|
CapturingProcessHandler(java.lang.Process process,
java.nio.charset.Charset charset,
java.lang.String commandLine)
commandLine must not be empty (for correct thread attribution in the stacktrace) |
Modifier and Type | Method and Description |
---|---|
protected CapturingProcessAdapter |
createProcessAdapter(ProcessOutput processOutput) |
java.nio.charset.Charset |
getCharset() |
ProcessOutput |
runProcess() |
ProcessOutput |
runProcess(int timeoutInMilliseconds)
Starts process with specified timeout
|
ProcessOutput |
runProcess(int timeoutInMilliseconds,
boolean destroyOnTimeout)
Starts process with specified timeout
|
ProcessOutput |
runProcessWithProgressIndicator(ProgressIndicator indicator) |
ProcessOutput |
runProcessWithProgressIndicator(ProgressIndicator indicator,
int timeoutInMilliseconds) |
ProcessOutput |
runProcessWithProgressIndicator(ProgressIndicator indicator,
int timeoutInMilliseconds,
boolean destroyOnTimeout) |
checkEdtAndReadAction, deleteFileOnTermination, doDestroyProcess, getDefaultModality, killProcessTree, onOSProcessTerminated, processCanBeKilledByOS, processHasSeparateErrorStream, readerOptions, setHasPty, setShouldDestroyProcessRecursively, shouldDestroyProcessRecursively, waitFor, waitFor
createErrorDataReader, createOutputDataReader, createProcessErrReader, createProcessOutReader, executeOnPooledThread, executeTask, startNotify, toString
closeStreams, destroyProcessImpl, detachIsDefault, detachProcessImpl, getCommandLine, getProcess, getProcessInput
addProcessListener, addProcessListener, destroyProcess, detachProcess, getExitCode, isProcessTerminated, isProcessTerminating, isSilentlyDestroyOnClose, isStartNotified, notifyProcessDetached, notifyProcessTerminated, notifyTextAvailable, removeProcessListener
changeUserMap, clearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMap
public CapturingProcessHandler(GeneralCommandLine commandLine) throws ExecutionException
ExecutionException
@Deprecated public CapturingProcessHandler(java.lang.Process process)
CapturingProcessHandler(Process, Charset, String)
insteadpublic CapturingProcessHandler(java.lang.Process process, java.nio.charset.Charset charset, java.lang.String commandLine)
commandLine
must not be empty (for correct thread attribution in the stacktrace)protected CapturingProcessAdapter createProcessAdapter(ProcessOutput processOutput)
public java.nio.charset.Charset getCharset()
getCharset
in class BaseProcessHandler<java.lang.Process>
public ProcessOutput runProcess()
public ProcessOutput runProcess(int timeoutInMilliseconds)
timeoutInMilliseconds
- non-positive means infinitypublic ProcessOutput runProcess(int timeoutInMilliseconds, boolean destroyOnTimeout)
timeoutInMilliseconds
- non-positive means infinitydestroyOnTimeout
- whether to kill the process after timeout passespublic ProcessOutput runProcessWithProgressIndicator(ProgressIndicator indicator)
public ProcessOutput runProcessWithProgressIndicator(ProgressIndicator indicator, int timeoutInMilliseconds)
public ProcessOutput runProcessWithProgressIndicator(ProgressIndicator indicator, int timeoutInMilliseconds, boolean destroyOnTimeout)