CmdProcess

de.halcony.processes.cmd.CmdProcess
class CmdProcess extends LogSupport

A cmd line process

Attributes

Graph
Supertypes
trait LogSupport
trait LazyLogger
trait LoggingMethods
trait Serializable
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def destroy(): Unit

interrupt/destroy the currently running process

interrupt/destroy the currently running process

Attributes

def destroyForcibly(): Unit

destroys the process forcibly (die!!!!!)

destroys the process forcibly (die!!!!!)

Attributes

def destroyOrElse(orElse: => Unit): Unit

interrupt/destroy the current process and handle failure to do so (after a graceperiod of 100ms)

interrupt/destroy the current process and handle failure to do so (after a graceperiod of 100ms)

Value parameters

orElse

what to do if the process did not terminate

Attributes

def destroyOrElse(gracePeriod: Long, unit: TimeUnit, orElse: => Unit): Unit

interrupt/destroy the current process and handle failure to do so

interrupt/destroy the current process and handle failure to do so

Value parameters

gracePeriod

graceperiod to check if successfull

orElse

what to do if the process did not terminate

unit

graceperiod time unit

Attributes

def flushOutputs(): Unit
def getExitValue: Int

get the process exit value

get the process exit value

Attributes

Returns

the exit value (error if not yet terminated)

def getStdErr: String

get the stderr output (so far) of the process

get the stderr output (so far) of the process

Attributes

Returns

the output (so far) of the process

def getStdout: String

get the stdout output (so far) of the process

get the stdout output (so far) of the process

Attributes

Returns

the output (so far) of the process

def getWrappedProcess: Process

returns the wrapped java.Process

returns the wrapped java.Process

Attributes

Returns

the wrapped java.Process

def isAlive: Boolean
def isAlive(descendants: Boolean): Boolean

checks if the underlying process is alive

checks if the underlying process is alive

Attributes

Returns

true if the underlying process is alive

def setLogLevel(level: LogLevel): CmdProcess

set the log level of the current process

set the log level of the current process

Value parameters

level

the log level

Attributes

Returns

the current process

def waitFor(timeout: Long, unit: TimeUnit): Boolean

wait for the process to terminate

wait for the process to terminate

Value parameters

timeout

timeout length

unit

timeout unit

Attributes

Returns

whether the process terminated within the allotted time

def waitFor[T](timeout: Long, unit: TimeUnit, onSuccess: => T, onFailure: => T): T

waits for the process to terminate and handles success/failure

waits for the process to terminate and handles success/failure

Type parameters

T

the return type of both succces and failure

Value parameters

onFailure

what to do if the process does not terminate on time

onSuccess

what to do if the process terminates on time

timeout

timout length

unit

timeout unit

Attributes

Returns

the value returned by success/failure

Inherited methods

inline protected def debug(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def debug(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def error(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def error(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def info(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def info(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def logAt(inline logLevel: LogLevel, inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def trace(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def trace(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def warn(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def warn(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods

Concrete fields

val READ_BUFFER_SIZE: Int