JDeveloper SCM API

oracle.ide.scm.util.runner
Interface SCMProcess


public interface SCMProcess

Interface to wrappers for shell processes. Instances are returned by the shell runner for control over and feedback from the running process.


Method Summary
 void destroy()
          Forcefully terminates the process.
 java.io.InputStream getErrorStream()
          Gets the error stream of the subprocess.
 java.lang.String getErrorText()
          Gets all text sent to standard error from the process.
 java.lang.Integer getExitCode()
          Gets the exit code from the process.
 long getIdleTimeElapsed()
          Gets the approximate idle time elapsed since the command was executed.
 java.io.InputStream getInputStream()
          Gets the input stream of the subprocess.
 java.io.OutputStream getOutputStream()
          Gets the output stream of the subprocess.
 java.lang.String getOutputText()
          Gets all text sent to standard out from the process.
 long getTimeElapsed()
          Gets the approximate time elapsed since the command was executed.
 boolean isFinished()
          Asks whether the process has terminated.
 boolean isTimedOut()
          Asks whether the process timed out.
 void sendInputData(java.lang.String data)
          Sends the given data as input to the process.
 SCMProcess waitFor()
          Waits, or blocks, until the process terminates.
 

Method Detail

isFinished

public boolean isFinished()
Asks whether the process has terminated.
Returns:
a verdict on whether the process has finished.

waitFor

public SCMProcess waitFor()
Waits, or blocks, until the process terminates.
Returns:
the finished process (same as the receiving object).

getErrorStream

public java.io.InputStream getErrorStream()
Gets the error stream of the subprocess.
Returns:
the input stream connected to the error stream of the subprocess.

getInputStream

public java.io.InputStream getInputStream()
Gets the input stream of the subprocess.
Returns:
the input stream connected to the normal output of the subprocess.

getOutputStream

public java.io.OutputStream getOutputStream()
Gets the output stream of the subprocess.
Returns:
the output stream connected to the normal input of the subprocess.

getOutputText

public java.lang.String getOutputText()
Gets all text sent to standard out from the process.
Returns:
the String containing all 'standard out' output.

getErrorText

public java.lang.String getErrorText()
Gets all text sent to standard error from the process.
Returns:
the String containing all 'standard error' output.

getExitCode

public java.lang.Integer getExitCode()
Gets the exit code from the process.
Returns:
the integer exit code, which will be null if the process has not yet finished work

getTimeElapsed

public long getTimeElapsed()
Gets the approximate time elapsed since the command was executed.
Returns:
a measure, in milliseconds, of elapsed time.

getIdleTimeElapsed

public long getIdleTimeElapsed()
Gets the approximate idle time elapsed since the command was executed.
Returns:
a measure, in milliseconds, of elapsed idle time.

isTimedOut

public boolean isTimedOut()
Asks whether the process timed out.
Returns:
a verdict on whether this process timed out.

sendInputData

public void sendInputData(java.lang.String data)
Sends the given data as input to the process.
Parameters:
data - the textual data for writing to the process's outpuut stream.

destroy

public void destroy()
Forcefully terminates the process.

Copyright © 2002 Oracle Corporation