org.eclipse.cdt.internal.core
Class ProcessClosure

java.lang.Object
  extended by org.eclipse.cdt.internal.core.ProcessClosure

public class ProcessClosure
extends java.lang.Object

Bundled state of a launched process including the threads linking the process in/output to console documents.


Constructor Summary
ProcessClosure(java.lang.Process process, java.io.OutputStream outputStream, java.io.OutputStream errorStream)
          Creates a process closure and connects the launched process with a console document.
 
Method Summary
 boolean isAlive()
           
 boolean isRunning()
          The same functionality as "isAlive()" but does not affect out streams, because they can be shared among processes
 void runBlocking()
           
 void runNonBlocking()
          Live links the launched process with the configured in/out streams using reader threads.
 void terminate()
          Forces the termination the launched process
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessClosure

public ProcessClosure(java.lang.Process process,
                      java.io.OutputStream outputStream,
                      java.io.OutputStream errorStream)
Creates a process closure and connects the launched process with a console document.

Parameters:
outputStream - prcess stdout is written to this stream. Can be null, if not interested in reading the output
errorStream - prcess stderr is written to this stream. Can be null, if not interested in reading the output
Method Detail

runNonBlocking

public void runNonBlocking()
Live links the launched process with the configured in/out streams using reader threads.


runBlocking

public void runBlocking()

isAlive

public boolean isAlive()

isRunning

public boolean isRunning()
The same functionality as "isAlive()" but does not affect out streams, because they can be shared among processes

Returns:

terminate

public void terminate()
Forces the termination the launched process