-
- All Implemented Interfaces:
-
eu.jrie.jetbrains.kotlinshell.processes.execution.ExecutionContext,eu.jrie.jetbrains.kotlinshell.processes.execution.ProcessExecutionContext,eu.jrie.jetbrains.kotlinshell.shell.ShellBase,eu.jrie.jetbrains.kotlinshell.shell.ShellUtility
@ExperimentalCoroutinesApi() public interface ShellProcess implements ShellUtility
-
-
Method Summary
Modifier and Type Method Description ProcessExecutablesystemProcess(Function1<SystemProcessConfiguration, Unit> config)Creates executable system process ProcessExecutablesystemProcess(String cmd)Creates executable system process from cmd command line ProcessExecutablesystemProcess(File file, String arg)Creates executable system process from file contents ProcessBuildersystemBuilder(Function1<SystemProcessConfiguration, Unit> config)Creates builder for system process ProcessExecutableprocess(String $self)Creates executable system process from this command line ProcessExecutableprocess(File $self, String args)Creates executable system process from contents of this File Processinvoke(String $self, ExecutionMode mode)Executes system process from this command line Processinvoke(File $self, String args)Executes system process from from contents of this File Processinvoke(File $self, ExecutionMode mode, String args)Executes system process from from contents of this File in given mode Processinvoke(ProcessExecutable $self, ExecutionMode mode)Starts the Process in given ExecutionMode ProcessExecutablektsProcess(Function1<KtsProcessConfiguration, Unit> config)Creates executable KotlinScript process ProcessBuilderktsBuilder(Function1<KtsProcessConfiguration, Unit> config)Creates builder for KotlinScript process ProcessExecutablekts(String $self)Creates executable KotlinScript process from given script abstract Processdetach(ProcessExecutable executable)Detaches process from the shell and executes it in the background List<Process>detach(ProcessExecutable process)Detaches processes from the shell and executes it in the background abstract UnitjoinDetached()Joins all detached processes abstract Unitfg(Process process)Attaches selected Process abstract Processdaemon(ProcessExecutable executable)List<Process>daemon(ProcessExecutable executable)Unitjoin(Process $self)Joins the Process Unitjoin(Process process)Joins given processes UnitjoinAll()Joins all running processes Unitkill(Process $self)Kill the Process Unitkill(Process process)Kills given processes UnitkillAll()Kills all running processes ProcessbyVPID(List<Process> $self, Integer vPID)Retrieves Process by its vPID List<Process>running(List<Process> $self)Retrieves all running processes List<Process>terminated(List<Process> $self)Retrieves all terminated processes List<Process>getProcesses()abstract List<Pair<Integer, Process>>getDetachedProcesses()List of detached processes abstract List<Process>getDaemons()List of daemon processes abstract ReceiveChannel<ByteReadPacket>getNullin()Dummy input channel. abstract SendChannel<ByteReadPacket>getNullout()Dummy output channel. SuspendFunction1<ExecutionContext, Unit>getPs()SuspendFunction1<ExecutionContext, Unit>getEnv()SuspendFunction1<ExecutionContext, Unit>getSet()Map<String, String>getShellEnv()Map<String, String>getSystemEnv()abstract CoroutineScopegetScope()CoroutineScope used by this shell, its members and sub shells abstract Map<String, String>getEnvironment()Environment of this shell. abstract Map<String, String>getVariables()Variables of this shell. abstract FilegetDirectory()Current directory of this shell abstract ProcessCommandergetCommander()abstract ReceiveChannel<ByteReadPacket>getStdin()abstract SendChannel<ByteReadPacket>getStdout()abstract SendChannel<ByteReadPacket>getStderr()-
Methods inherited from class eu.jrie.jetbrains.kotlinshell.shell.ShellUtility
closeOut, command, finalize, invoke -
Methods inherited from class eu.jrie.jetbrains.kotlinshell.shell.ShellProcess
cd, cd, cd, cd, cd, env, export, export, file, file, mkdir, unset, variable, variable -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
systemProcess
ProcessExecutable systemProcess(Function1<SystemProcessConfiguration, Unit> config)
Creates executable system process
-
systemProcess
ProcessExecutable systemProcess(String cmd)
Creates executable system process from cmd command line
-
systemProcess
ProcessExecutable systemProcess(File file, String arg)
Creates executable system process from file contents
-
systemBuilder
ProcessBuilder systemBuilder(Function1<SystemProcessConfiguration, Unit> config)
Creates builder for system process
-
process
ProcessExecutable process(String $self)
Creates executable system process from this command line
-
process
ProcessExecutable process(File $self, String args)
Creates executable system process from contents of this File
-
invoke
Process invoke(String $self, ExecutionMode mode)
Executes system process from this command line
-
invoke
Process invoke(File $self, String args)
Executes system process from from contents of this File
-
invoke
Process invoke(File $self, ExecutionMode mode, String args)
-
invoke
Process invoke(ProcessExecutable $self, ExecutionMode mode)
Starts the Process in given ExecutionMode
-
ktsProcess
ProcessExecutable ktsProcess(Function1<KtsProcessConfiguration, Unit> config)
Creates executable KotlinScript process
-
ktsBuilder
ProcessBuilder ktsBuilder(Function1<KtsProcessConfiguration, Unit> config)
Creates builder for KotlinScript process
-
kts
ProcessExecutable kts(String $self)
Creates executable KotlinScript process from given script
-
detach
abstract Process detach(ProcessExecutable executable)
Detaches process from the shell and executes it in the background
-
detach
List<Process> detach(ProcessExecutable process)
Detaches processes from the shell and executes it in the background
-
joinDetached
abstract Unit joinDetached()
Joins all detached processes
-
daemon
abstract Process daemon(ProcessExecutable executable)
-
daemon
List<Process> daemon(ProcessExecutable executable)
-
terminated
List<Process> terminated(List<Process> $self)
Retrieves all terminated processes
-
getProcesses
List<Process> getProcesses()
-
getDetachedProcesses
abstract List<Pair<Integer, Process>> getDetachedProcesses()
List of detached processes
-
getDaemons
abstract List<Process> getDaemons()
List of daemon processes
-
getNullin
abstract ReceiveChannel<ByteReadPacket> getNullin()
Dummy input channel. Behaves like
/dev/null.
-
getNullout
abstract SendChannel<ByteReadPacket> getNullout()
Dummy output channel. Behaves like
/dev/null.
-
getPs
SuspendFunction1<ExecutionContext, Unit> getPs()
-
getEnv
SuspendFunction1<ExecutionContext, Unit> getEnv()
-
getSet
SuspendFunction1<ExecutionContext, Unit> getSet()
-
getShellEnv
Map<String, String> getShellEnv()
-
getSystemEnv
Map<String, String> getSystemEnv()
-
getScope
abstract CoroutineScope getScope()
CoroutineScope used by this shell, its members and sub shells
-
getEnvironment
abstract Map<String, String> getEnvironment()
Environment of this shell. These variables are being inherited to sub shells.
-
getVariables
abstract Map<String, String> getVariables()
Variables of this shell. These variables are not being inherited to sub shells.
-
getDirectory
abstract File getDirectory()
Current directory of this shell
-
getCommander
abstract ProcessCommander getCommander()
-
getStdin
abstract ReceiveChannel<ByteReadPacket> getStdin()
-
getStdout
abstract SendChannel<ByteReadPacket> getStdout()
-
getStderr
abstract SendChannel<ByteReadPacket> getStderr()
-
-
-
-