ProcessImplOE

io.github.vigoo.prox.ProcessModule.Process.ProcessImplOE
case class ProcessImplOE[O, E](command: String, arguments: List[String], workingDirectory: Option[Path], environmentVariables: Map[String, String], removedEnvironmentVariables: Set[String], outputRedirection: OutputRedirection, runOutputStream: InputStream => ProxIO[O], errorRedirection: OutputRedirection, runErrorStream: InputStream => ProxIO[E], inputRedirection: InputRedirection) extends Process[O, E], RedirectableInput[ProcessImplIOE[O, E]]

Process with bound output and error streams

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Process[O, E]
trait ProcessLike
class Object
trait Matchable
class Any
Show all

Members list

Type members

Types

override type Self = ProcessImplOE[O, E]

Value members

Concrete methods

override def connectInput(source: InputRedirection): ProcessImplIOE[O, E]

The low level method to attach an input to a process or process group.

The low level method to attach an input to a process or process group.

Use the other methods in this trait for convenience.

Value parameters

source

Redirection source

Attributes

Returns

A new process or process group with the input redirected and the input redirection capability removed.

Definition Classes

Inherited methods

def !<(stream: ProxStream[Byte]): P

Feed the process input from a byte stream with flushing per chunks enabled.

Feed the process input from a byte stream with flushing per chunks enabled.

An alias for fromStream.

Value parameters

stream

Input stream

Attributes

Returns

A new process or process group with the input redirected and the input redirection capability removed.

Inherited from:
RedirectableInput
def <(stream: ProxStream[Byte]): P

Feed the process input from a byte stream.

Feed the process input from a byte stream.

An alias for fromStream.

Value parameters

stream

Input stream

Attributes

Returns

A new process or process group with the input redirected and the input redirection capability removed.

Inherited from:
RedirectableInput
def <(path: Path): P

Feed the process input from a file natively.

Feed the process input from a file natively.

An alias for fromFile.

Value parameters

path

Path to the file

Attributes

Returns

A new process or process group with the input redirected and the input redirection capability removed.

Inherited from:
RedirectableInput
def `with`(nameValuePair: (String, String)): Self

Adds an environment variable to the process

Adds an environment variable to the process

Value parameters

nameValuePair

A pair of name and value

Attributes

Returns

a new process with the working directory set

Inherited from:
ProcessLikeConfiguration
override protected def applyConfiguration(workingDirectory: Option[Path], environmentVariables: Map[String, String], removedEnvironmentVariables: Set[String]): Self

Attributes

Definition Classes
Inherited from:
ProcessConfiguration
def fromFile(path: Path): P

Feed the process input from a file natively.

Feed the process input from a file natively.

An alias for &lt;.

Value parameters

path

Path to the file

Attributes

Returns

A new process or process group with the input redirected and the input redirection capability removed.

Inherited from:
RedirectableInput
def fromStream(stream: ProxStream[Byte], flushChunks: Boolean): P

Feed the process input from a byte stream.

Feed the process input from a byte stream.

An alias for &lt; and !&lt;.

Value parameters

flushChunks

Flush the process input stream after each chunk

stream

Input stream

Attributes

Returns

A new process or process group with the input redirected and the input redirection capability removed.

Inherited from:
RedirectableInput
def in(workingDirectory: Path): Self

Changes the working directory of the process

Changes the working directory of the process

Value parameters

workingDirectory

the working directory

Attributes

Returns

a new process with the working directory set

Inherited from:
ProcessLikeConfiguration

Use the inherited working directory of the process instead of an explicit one

Use the inherited working directory of the process instead of an explicit one

Attributes

Returns

a new process with the working directory cleared

Inherited from:
ProcessLikeConfiguration
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def run[Info]()(implicit runner: ProcessRunner[Info]): ProxIO[ProcessResult[O, E]]

Starts the process asynchronously and blocks the execution until it is finished

Starts the process asynchronously and blocks the execution until it is finished

Value parameters

runner

The process runner to be used

Attributes

Returns

the result of the finished process

Inherited from:
Process
def start[Info]()(implicit runner: ProcessRunner[Info]): ProxResource[ProxFiber[ProcessResult[O, E]]]

Starts the process asynchronously and returns a closeable fiber representing it

Starts the process asynchronously and returns a closeable fiber representing it

Joining the fiber waits for the process to be terminated. Canceling the fiber terminates the process normally (with SIGTERM).

Value parameters

runner

The process runner to be used

Attributes

Returns

a managed fiber representing the running process

Inherited from:
Process
def startProcess[Info]()(implicit runner: ProcessRunner[Info]): ProxIO[RunningProcess[O, E, Info]]

Starts the process asynchronously and returns the RunningProcess interface for it

Starts the process asynchronously and returns the RunningProcess interface for it

This is the most advanced way to start processes. See start and run as alternatives.

Type parameters

Info

The runner-specific process info type

Value parameters

runner

The process runner to be used

Attributes

Returns

interface for handling the running process

Inherited from:
Process
def withArguments(newArguments: List[String]): Self

Replaces the arguments

Replaces the arguments

Value parameters

newArguments

new list of arguments

Attributes

Returns

returns a new process specification

Inherited from:
ProcessConfiguration
def withCommand(newCommand: String): Self

Replaces the command

Replaces the command

Value parameters

newCommand

new value for the command to be executed

Attributes

Returns

returns a new process specification

Inherited from:
ProcessConfiguration
def without(name: String): Self

Removes an environment variable from the process

Removes an environment variable from the process

Usable to remove variables inherited from the parent process.

Value parameters

name

Name of the environment variable

Attributes

Returns

a new process with the working directory set

Inherited from:
ProcessLikeConfiguration