Class Process

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Process​(IProcessEnvironment processEnvironment, ISystemCommand systemCommand)
      Constructor for Process
        Process​(IProcessEnvironment processEnvironment, ISystemCommand systemCommand, java.lang.Long pid, java.time.Instant startTime, java.time.Duration totalCpuDuration, java.lang.Integer exitValue, java.io.OutputStream inputStream, java.io.InputStream outputStream, java.io.InputStream errorStream)
      Constructor for Process
    • Constructor Detail

      • Process

        public Process​(IProcessEnvironment processEnvironment,
                       ISystemCommand systemCommand,
                       java.lang.Long pid,
                       java.time.Instant startTime,
                       java.time.Duration totalCpuDuration,
                       java.lang.Integer exitValue,
                       java.io.OutputStream inputStream,
                       java.io.InputStream outputStream,
                       java.io.InputStream errorStream)
        Constructor for Process
        Parameters:
        processEnvironment - the process environment
        pid - the pid
        systemCommand - the system command
        startTime - the start time
        totalCpuDuration - the total cpu duration
        exitValue - the exist value
        inputStream - the input stream
        outputStream - the output stream
        errorStream - the error stream
      • Process

        protected Process​(IProcessEnvironment processEnvironment,
                          ISystemCommand systemCommand)
        Constructor for Process
        Parameters:
        processEnvironment - the process environment
        systemCommand - the system command
    • Method Detail

      • getPid

        public java.lang.Long getPid()
        Description copied from interface: IProcess
        Get the process id.
        Specified by:
        getPid in interface IProcess
        Returns:
        the native process id of the process or null if unknown
        See Also:
        IProcess.getPid()
      • getInputStream

        public java.io.OutputStream getInputStream()
        Description copied from interface: IProcess
        Get the standard input stream connected the process.
        Specified by:
        getInputStream in interface IProcess
        Returns:
        the standard input stream connected to the process
        See Also:
        IProcess.getInputStream()
      • getOutputStream

        public java.io.InputStream getOutputStream()
        Description copied from interface: IProcess
        Get the standard output stream connected the process.
        Specified by:
        getOutputStream in interface IProcess
        Returns:
        the standard output stream connected to the process
        See Also:
        IProcess.getOutputStream()
      • getErrorStream

        public java.io.InputStream getErrorStream()
        Description copied from interface: IProcess
        Get the standard error stream connected the process.
        Specified by:
        getErrorStream in interface IProcess
        Returns:
        the error stream connected to the process
        See Also:
        IProcess.getErrorStream()
      • getStartTime

        public java.time.Instant getStartTime()
        Description copied from interface: IProcess
        Get the start time of the process.
        Specified by:
        getStartTime in interface IProcess
        Returns:
        the start time of the process
        See Also:
        IProcess.getStartTime()
      • getExitValue

        public java.lang.Integer getExitValue()
        Description copied from interface: IProcess
        Get the exit value for the process.
        Specified by:
        getExitValue in interface IProcess
        Returns:
        the exit value of the process, by convention, the value 0 indicates normal termination. It return null if it has not exit by now.
        See Also:
        IProcess.getExitValue()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()