- All Superinterfaces:
AutoCloseable,ProcessControl
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.xpipe.core.process.ProcessControl
ProcessControl.ExceptionConverter -
Method Summary
Modifier and TypeMethodDescriptionbuildElevatedCommand(CommandConfiguration input, String prefix, UUID requestId, CountDown countDown) voiddefault CommandControlcommand(CommandBuilder builder) default CommandControldefault CommandControlcommand(Consumer<CommandBuilder> builder) elevated(String message, FailableFunction<ShellControl, Boolean, Exception> elevationFunction) default <T> TenforceDialect(@NonNull ShellDialect type, FailableFunction<ShellControl, T, Exception> sc) default booleanexecuteSimpleBooleanCommand(String command) default voidexecuteSimpleCommand(CommandBuilder 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) executeSimpleStringCommandAndCheck(String command) voidgetLock()default ShellControlbooleanbooleanisLocal()onExit(Consumer<ShellControl> pc) default CommandControlosascriptCommand(String script) prepareIntermediateTerminalOpen(String content, TerminalInitScriptConfig config, FailableFunction<ShellControl, String, Exception> workingDirectory) voidrestart()voidsetOriginalShellDialect(ShellDialect dialect) voidsingularSubShell(ShellOpenFunction command) start()default ShellControlsubShell(@NonNull ShellDialect type) subShell(ShellOpenFunction command, ShellOpenFunction terminalCommand) withErrorFormatter(Function<String, String> formatter) withInitSnippet(ScriptSnippet snippet) default <T extends ShellStoreState>
ShellControlwithShellStateFail(StatefulDataStore<T> store) default <T extends ShellStoreState>
ShellControlwithShellStateInit(StatefulDataStore<T> store) withSourceStore(ShellStore store) voidwriteLineAndReadEcho(String command) voidwriteLineAndReadEcho(String command, boolean log) Methods inherited from interface io.xpipe.core.process.ProcessControl
close, closeStdin, getCharset, getShellDialect, getStderr, getStdin, getStdout, getUuid, isRunning, isStdinClosed, kill, prepareTerminalOpen, resetData, write, writeLine, writeLine
-
Method Details
-
getElevationSecretId
UUID getElevationSecretId() -
getExitUuids
-
getSourceStore
Optional<ShellStore> getSourceStore() -
withSourceStore
-
getInitCommands
List<ScriptSnippet> getInitCommands() -
getParentSystemAccess
ParentSystemAccess getParentSystemAccess() -
setParentSystemAccess
-
getLocalSystemAccess
ParentSystemAccess getLocalSystemAccess() -
isLocal
boolean isLocal() -
getMachineRootSession
ShellControl getMachineRootSession() -
withoutLicenseCheck
ShellControl withoutLicenseCheck() -
getOsName
String getOsName() -
isLicenseCheck
boolean isLicenseCheck() -
getLock
ReentrantLock getLock() -
getOriginalShellDialect
ShellDialect getOriginalShellDialect() -
setOriginalShellDialect
-
onInit
-
withShellStateInit
-
withShellStateFail
-
onExit
-
onFail
-
withExceptionConverter
- Specified by:
withExceptionConverterin interfaceProcessControl
-
start
- Specified by:
startin interfaceProcessControl- Throws:
Exception
-
withErrorFormatter
-
prepareIntermediateTerminalOpen
String prepareIntermediateTerminalOpen(String content, TerminalInitScriptConfig config, FailableFunction<ShellControl, String, throws ExceptionException> workingDirectory) - Throws:
Exception
-
getSystemTemporaryDirectory
String getSystemTemporaryDirectory() -
osascriptCommand
-
executeSimpleRawBytesCommand
- Throws:
Exception
-
executeSimpleStringCommand
- Throws:
Exception
-
executeSimpleStringCommandAndCheck
- Throws:
Exception
-
executeSimpleBooleanCommand
- Throws:
Exception
-
executeSimpleCommand
- Throws:
Exception
-
executeSimpleCommand
- Throws:
Exception
-
executeSimpleCommand
- Throws:
Exception
-
executeSimpleStringCommand
- Throws:
Exception
-
withSecurityPolicy
-
getEffectiveSecurityPolicy
ShellSecurityPolicy getEffectiveSecurityPolicy() -
buildElevatedCommand
String buildElevatedCommand(CommandConfiguration input, String prefix, UUID requestId, CountDown countDown) throws Exception - Throws:
Exception
-
restart
- Throws:
Exception
-
getOsType
OsType.Any getOsType() -
elevated
ShellControl elevated(String message, FailableFunction<ShellControl, Boolean, Exception> elevationFunction) -
withInitSnippet
-
subShell
-
identicalSubShell
-
enforceDialect
default <T> T enforceDialect(@NonNull @NonNull ShellDialect type, FailableFunction<ShellControl, T, throws ExceptionException> sc) - Throws:
Exception
-
subShell
-
singularSubShell
-
writeLineAndReadEcho
- Throws:
Exception
-
writeLineAndReadEcho
- Throws:
Exception
-
cd
- Throws:
Exception
-
command
-
command
-
command
-
exitAndWait
- Throws:
IOException
-