- All Superinterfaces:
AutoCloseable,Closeable,ProcessControl
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.xpipe.core.process.ProcessControl
ProcessControl.ExceptionConverter -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionvoidaccumulateStderr(Consumer<String> con) voidaccumulateStdout(Consumer<String> con) complex()default booleanvoidvoidvoiddefault CommandControlelevated(String message, FailableFunction<ShellControl, Boolean, Exception> elevationFunction) default voidexecute()default booleanexitTimeout(Integer timeout) intbyte[]start()booleanwaitFor()withCustomCharset(Charset charset) withErrorFormatter(Function<String, String> formatter) voidwithWorkingDirectory(String directory) Methods inherited from interface io.xpipe.core.process.ProcessControl
close, closeStdin, getCharset, getShellDialect, getStderr, getStderrReader, getStdin, getStdout, getStdoutReader, isRunning, isStdinClosed, kill, prepareTerminalOpen, resetData, write, writeLine
-
Field Details
-
UNASSIGNED_EXIT_CODE
static final int UNASSIGNED_EXIT_CODE- See Also:
-
EXIT_TIMEOUT_EXIT_CODE
static final int EXIT_TIMEOUT_EXIT_CODE- See Also:
-
START_FAILED_EXIT_CODE
static final int START_FAILED_EXIT_CODE- See Also:
-
-
Method Details
-
withExceptionConverter
- Specified by:
withExceptionConverterin interfaceProcessControl
-
withErrorFormatter
-
terminalExitMode
-
doesNotObeyReturnValueConvention
CommandControl doesNotObeyReturnValueConvention() -
complex
CommandControl complex() -
notComplex
CommandControl notComplex() -
withWorkingDirectory
-
execute
- Throws:
Exception
-
executeAndCheck
- Throws:
Exception
-
getParent
ShellControl getParent() -
startExternalStdout
- Throws:
Exception
-
startExternalStdin
- Throws:
Exception
-
waitFor
boolean waitFor() -
withCustomCharset
-
getExitCode
int getExitCode() -
elevated
-
elevated
CommandControl elevated(String message, FailableFunction<ShellControl, Boolean, Exception> elevationFunction) -
start
- Specified by:
startin interfaceProcessControl- Throws:
Exception
-
exitTimeout
-
withStdoutOrThrow
-
readStdoutDiscardErr
- Throws:
Exception
-
discardOrThrow
- Throws:
Exception
-
accumulateStdout
-
accumulateStderr
-
readRawBytesOrThrow
- Throws:
Exception
-
readStdoutOrThrow
- Throws:
Exception
-
discardAndCheckExit
- Throws:
ProcessOutputException
-
discardOut
void discardOut() -
discardErr
void discardErr()
-