Interface IProcess
-
- All Known Subinterfaces:
IAsynchronousProcess
- All Known Implementing Classes:
AsynchrounousProcess,Process
public interface IProcessDefines the process
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.io.InputStreamgetErrorStream()Get the standard error stream connected the process.java.lang.IntegergetExitValue()Get the exit value for the process.java.io.OutputStreamgetInputStream()Get the standard input stream connected the process.java.io.InputStreamgetOutputStream()Get the standard output stream connected the process.java.lang.LonggetPid()Get the process id.IProcessEnvironmentgetProcessEnvironment()Get the process environmentjava.time.InstantgetStartTime()Get the start time of the process.ISystemCommandgetSystemCommand()Get the system command of the process.java.time.DurationgetTotalCpuDuration()Get the total cpu time accumulated of the process.
-
-
-
Method Detail
-
getProcessEnvironment
IProcessEnvironment getProcessEnvironment()
Get the process environment- Returns:
- the process environment
-
getSystemCommand
ISystemCommand getSystemCommand()
Get the system command of the process.- Returns:
- the system command of this process
-
getPid
java.lang.Long getPid()
Get the process id.- Returns:
- the native process id of the process or null if unknown
-
getInputStream
java.io.OutputStream getInputStream()
Get the standard input stream connected the process.- Returns:
- the standard input stream connected to the process
-
getOutputStream
java.io.InputStream getOutputStream()
Get the standard output stream connected the process.- Returns:
- the standard output stream connected to the process
-
getErrorStream
java.io.InputStream getErrorStream()
Get the standard error stream connected the process.- Returns:
- the error stream connected to the process
-
getStartTime
java.time.Instant getStartTime()
Get the start time of the process.- Returns:
- the start time of the process
-
getTotalCpuDuration
java.time.Duration getTotalCpuDuration()
Get the total cpu time accumulated of the process.- Returns:
- the accumulated total cpu time
-
getExitValue
java.lang.Integer getExitValue()
Get the exit value for the process.- Returns:
- the exit value of the process, by convention, the value
0indicates normal termination. It return null if it has not exit by now. - Throws:
java.lang.IllegalThreadStateException- if the process has not yet terminated
-
-