- All Superinterfaces:
AutoCloseable,Closeable,ProcessControl
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.xpipe.core.process.ProcessControl
ProcessControl.ExceptionConverter -
Method Summary
Modifier and TypeMethodDescriptionbuildElevatedCommand(String input) voidvoiddefault CommandControlcommand(CommandBuilder builder) command(FailableFunction<ShellControl, String, Exception> command) command(FailableFunction<ShellControl, String, Exception> command, FailableFunction<ShellControl, String, Exception> terminalCommand) default CommandControldefault CommandControlelevateCommand(String input) elevated(String message, FailableFunction<ShellControl, Boolean, Exception> elevationFunction) default ShellControlelevationPassword(SecretValue value) default ShellControlenforcedDialect(ShellDialect type) default <T> TenforceDialect(@NonNull ShellDialect type, FailableFunction<ShellControl, T, Exception> sc) voidexecuteLine(String command) default booleanexecuteSimpleBooleanCommand(String command) default voidexecuteSimpleCommand(String command) default voidexecuteSimpleCommand(String command, String failMessage) default byte[]executeSimpleRawBytesCommand(String command) default StringexecuteSimpleStringCommand(ShellDialect type, String command) default StringexecuteSimpleStringCommand(String command) voiddefault ShellControldefault booleanisLocal()onExit(Consumer<ShellControl> pc) onInit(Consumer<ShellControl> pc) default CommandControlosascriptCommand(String script) prepareIntermediateTerminalOpen(String content, String displayName) prepareTerminalOpen(String displayName) voidrestart()start()startTimeout(int ms) default ShellControlsubShell(@NonNull ShellDialect type) subShell(FailableFunction<ShellControl, String, Exception> command, ShellControl.TerminalOpenFunction terminalCommand) default ShellControlwithErrorFormatter(Function<String, String> formatter) Methods inherited from interface io.xpipe.core.process.ProcessControl
close, closeStdin, getCharset, getShellDialect, getStderr, getStderrReader, getStdin, getStdout, getStdoutReader, isRunning, isStdinClosed, kill, resetData, write, writeLine
-
Method Details
-
isLocal
default boolean isLocal() -
getSystemId
UUID getSystemId() -
getCommandLock
Semaphore getCommandLock() -
onInit
-
onExit
-
onFail
-
elevateCommand
- Throws:
Exception
-
withExceptionConverter
- Specified by:
withExceptionConverterin interfaceProcessControl
-
withErrorFormatter
-
prepareTerminalOpen
- Specified by:
prepareTerminalOpenin interfaceProcessControl- Throws:
Exception
-
prepareIntermediateTerminalOpen
- Throws:
Exception
-
getSystemTemporaryDirectory
String getSystemTemporaryDirectory() -
getSubTemporaryDirectory
String getSubTemporaryDirectory() -
checkRunning
void checkRunning() -
osascriptCommand
-
executeSimpleRawBytesCommand
- Throws:
Exception
-
executeSimpleStringCommand
- Throws:
Exception
-
executeSimpleBooleanCommand
- Throws:
Exception
-
executeSimpleCommand
- Throws:
Exception
-
executeSimpleCommand
- Throws:
Exception
-
executeSimpleStringCommand
- Throws:
Exception
-
buildElevatedCommand
- Throws:
Exception
-
restart
- Throws:
Exception
-
getOsType
OsType getOsType() -
getElevationConfig
ElevationConfig getElevationConfig() -
elevated
ShellControl elevated(String message, FailableFunction<ShellControl, Boolean, Exception> elevationFunction) -
elevationPassword
-
elevationPassword
-
initWith
-
initWith
-
startTimeout
-
getElevationPassword
FailableSupplier<SecretValue> getElevationPassword() -
subShell
-
identicalSubShell
-
subShell
-
enforcedDialect
- Throws:
Exception
-
enforceDialect
default <T> T enforceDialect(@NonNull @NonNull ShellDialect type, FailableFunction<ShellControl, T, throws ExceptionException> sc) - Throws:
Exception
-
subShell
ShellControl subShell(FailableFunction<ShellControl, String, Exception> command, ShellControl.TerminalOpenFunction terminalCommand) -
executeLine
- Throws:
Exception
-
cd
- Throws:
Exception
-
start
ShellControl start()- Specified by:
startin interfaceProcessControl
-
command
-
command
CommandControl command(FailableFunction<ShellControl, String, Exception> command, FailableFunction<ShellControl, String, Exception> terminalCommand) -
command
-
command
-
command
-
exitAndWait
- Throws:
IOException
-