- All Superinterfaces:
AutoCloseable,ProcessControl
- All Known Implementing Classes:
StubShellControl,WrapperShellControl
-
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) default booleanvoidvoidcommand(CommandBuilder builder) default CommandControldefault CommandControlcommand(Consumer<CommandBuilder> builder) elevated(ElevationFunction elevationFunction) default ShellControlelevateIfNeeded(ElevationFunction function) default <T> TenforceDialect(@NonNull ShellDialect type, FailableFunction<ShellControl, T, Exception> sc) default booleanexecuteSimpleBooleanCommand(String command) default voidexecuteSimpleCommand(CommandBuilder command) default voidexecuteSimpleCommand(String command) default StringexecuteSimpleStringCommand(String command) voidgetLock()default ShellControlbooleanbooleanisLocal()onExit(Consumer<ShellControl> pc) default CommandControlosascriptCommand(String script) prepareIntermediateTerminalOpen(TerminalInitFunction content, TerminalInitScriptConfig config, WorkingDirectoryFunction workingDirectory) voidvoidrestart()voidvoidvoidsetOriginalShellDialect(ShellDialect dialect) voidvoidsetWorkingDirectory(WorkingDirectoryFunction workingDirectory) singularSubShell(ShellOpenFunction command) start()default ShellControlsubShell(@NonNull ShellDialect type) subShell(ShellOpenFunction command, ShellOpenFunction terminalCommand) withErrorFormatter(Function<String, String> formatter) withInitSnippet(ShellInitCommand snippet) default <T extends ShellStoreState>
ShellControlwithShellStateFail(StatefulDataStore<T> store) default <T extends ShellStoreState>
ShellControlwithShellStateInit(StatefulDataStore<T> store) withSourceStore(DataStore store) Methods inherited from interface io.xpipe.core.process.ProcessControl
close, closeStdin, getCharset, getShellDialect, getStderr, getStdin, getStdout, getUuid, isRunning, isStdinClosed, kill, prepareTerminalOpen, refreshRunningState, resetData, shutdown, write, writeLine, writeLine
-
Method Details
-
getParentControl
Optional<ShellControl> getParentControl() -
getTtyState
ShellTtyState getTtyState() -
setNonInteractive
void setNonInteractive() -
isInteractive
boolean isInteractive() -
getElevationHandler
ElevationHandler getElevationHandler() -
setElevationHandler
-
getExitUuids
-
setWorkingDirectory
-
getSourceStore
-
withSourceStore
-
getInitCommands
List<ShellInitCommand> getInitCommands() -
getParentSystemAccess
ParentSystemAccess getParentSystemAccess() -
setParentSystemAccess
-
getLocalSystemAccess
ParentSystemAccess getLocalSystemAccess() -
isLocal
boolean isLocal() -
canHaveSubshells
default boolean canHaveSubshells() -
getMachineRootSession
ShellControl getMachineRootSession() -
getOsName
String getOsName() -
getLock
ReentrantLock getLock() -
requireLicensedFeature
-
getOriginalShellDialect
ShellDialect getOriginalShellDialect() -
setOriginalShellDialect
-
onInit
-
withShellStateInit
-
withShellStateFail
-
onExit
-
onKill
-
onStartupFail
-
withExceptionConverter
- Specified by:
withExceptionConverterin interfaceProcessControl
-
start
- Specified by:
startin interfaceProcessControl- Throws:
Exception
-
withErrorFormatter
-
checkLicenseOrThrow
void checkLicenseOrThrow() -
prepareIntermediateTerminalOpen
String prepareIntermediateTerminalOpen(TerminalInitFunction content, TerminalInitScriptConfig config, WorkingDirectoryFunction workingDirectory) throws Exception - Throws:
Exception
-
getSystemTemporaryDirectory
FilePath getSystemTemporaryDirectory() -
osascriptCommand
-
executeSimpleStringCommand
-
executeSimpleBooleanCommand
-
executeSimpleCommand
- Throws:
Exception
-
executeSimpleCommand
-
withSecurityPolicy
-
getEffectiveSecurityPolicy
ShellSecurityPolicy getEffectiveSecurityPolicy() -
buildElevatedCommand
-
restart
-
getOsType
OsType.Any getOsType() -
elevated
-
withInitSnippet
-
subShell
-
identicalSubShell
-
elevateIfNeeded
- Throws:
Exception
-
enforceDialect
default <T> T enforceDialect(@NonNull @NonNull ShellDialect type, FailableFunction<ShellControl, T, throws ExceptionException> sc) - Throws:
Exception
-
subShell
-
singularSubShell
-
cd
-
command
-
command
-
command
-
exitAndWait
- Throws:
IOException
-