- All Superinterfaces:
AutoCloseable,Closeable,ProcessControl
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanvoidcommand(FailableFunction<ShellControl, String, Exception> command) command(FailableFunction<ShellControl, String, Exception> command, FailableFunction<ShellControl, String, Exception> terminalCommand) default CommandControldefault CommandControlelevated(String message, FailableFunction<ShellControl, Boolean, Exception> elevationFunction) elevationPassword(SecretValue value) default ShellControlenforcedDialect(ShellDialect type) 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 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 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
-
isLocal
default boolean isLocal() -
getSystemId
UUID getSystemId() -
getCommandLock
Semaphore getCommandLock() -
onInit
-
onExit
-
withMessageFormatter
-
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
-
restart
- Throws:
Exception
-
getOsType
OsType getOsType() -
checkCanElevate
- Throws:
Exception
-
elevated
ShellControl elevated(String message, FailableFunction<ShellControl, Boolean, Exception> elevationFunction) -
elevationPassword
-
initWith
-
initWith
-
startTimeout
-
getElevationPassword
SecretValue getElevationPassword() -
subShell
-
identicalSubShell
-
subShell
-
enforcedDialect
- Throws:
Exception
-
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
-