- All Superinterfaces:
AutoCloseable,Closeable,ProcessControl
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcommand(FailableFunction<ShellControl, String, Exception> command) command(FailableFunction<ShellControl, String, Exception> command, FailableFunction<ShellControl, String, Exception> terminalCommand) default CommandControldefault CommandControlelevated(FailableFunction<ShellControl, Boolean, Exception> elevationFunction) elevationPassword(SecretValue value) default <T> TenforceDialect(@NonNull ShellDialect type, Function<ShellControl, T> sc) voidexecuteLine(String command) default booleanexecuteSimpleBooleanCommand(String command) default voidexecuteSimpleCommand(String command) default voidexecuteSimpleCommand(String command, String failMessage) default StringexecuteSimpleStringCommand(ShellDialect type, String command) default StringexecuteSimpleStringCommand(String command) voiddefault ShellControlbooleanisLocal()onExit(Consumer<ShellControl> pc) onInit(Consumer<ShellControl> pc) 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 ShellControlwithMessageFormatter(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, sensitive, write, writeLine
-
Method Details
-
getCommandLock
Semaphore getCommandLock() -
onInit
-
onExit
-
withMessageFormatter
-
prepareTerminalOpen
- Specified by:
prepareTerminalOpenin interfaceProcessControl- Throws:
Exception
-
prepareIntermediateTerminalOpen
- Throws:
Exception
-
getTemporaryDirectory
- Throws:
Exception
-
checkRunning
- Throws:
Exception
-
executeSimpleStringCommand
- Throws:
Exception
-
executeSimpleBooleanCommand
- Throws:
Exception
-
executeSimpleCommand
- Throws:
Exception
-
executeSimpleCommand
- Throws:
Exception
-
executeSimpleStringCommand
- Throws:
Exception
-
restart
- Throws:
Exception
-
isLocal
boolean isLocal() -
getOsType
OsType getOsType() -
elevated
-
elevationPassword
-
initWith
-
initWith
-
startTimeout
-
getElevationPassword
SecretValue getElevationPassword() -
subShell
-
identicalSubShell
-
subShell
-
enforceDialect
default <T> T enforceDialect(@NonNull @NonNull ShellDialect type, Function<ShellControl, T> sc) throws Exception- Throws:
Exception
-
subShell
ShellControl subShell(FailableFunction<ShellControl, String, Exception> command, ShellControl.TerminalOpenFunction terminalCommand) -
executeLine
- Throws:
Exception
-
cd
- Throws:
Exception
-
start
- Specified by:
startin interfaceProcessControl- Throws:
Exception
-
command
-
command
CommandControl command(FailableFunction<ShellControl, String, Exception> command, FailableFunction<ShellControl, String, Exception> terminalCommand) -
command
-
command
-
exitAndWait
- Throws:
IOException
-