org.terracotta.ipceventbus.proc
Class AnyProcess

java.lang.Object
  extended by java.lang.Process
      extended by org.terracotta.ipceventbus.proc.AnyProcess
Direct Known Subclasses:
JavaProcess

public class AnyProcess
extends Process

Author:
Mathieu Carbou

Method Summary
 void destroy()
           
 int exitValue()
           
 List<String> getCommand()
           
 String getCommandLine()
           
protected  String getCurrentPid()
           
 InputStream getErrorStream()
           
 Future<Integer> getFuture()
           
 InputStream getInputStream()
           
 OutputStream getOutputStream()
           
 long getPid()
           
 byte[] getRecordedStderr()
           
 String getRecordedStderrText()
           
 byte[] getRecordedStdout()
           
 String getRecordedStdoutText()
           
 File getWorkingDirectory()
           
 boolean isDestroyed()
           
 boolean isRunning()
           
protected static boolean isWindows()
           
static AnyProcessBuilder<? extends AnyProcess> newBuilder()
           
protected  void onDestroyed()
           
protected  void onTerminated()
           
 String toString()
           
 int waitFor()
           
 int waitForTime(long time, TimeUnit unit)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getOutputStream

public final OutputStream getOutputStream()
Specified by:
getOutputStream in class Process

getInputStream

public final InputStream getInputStream()
Specified by:
getInputStream in class Process

getErrorStream

public final InputStream getErrorStream()
Specified by:
getErrorStream in class Process

waitFor

public final int waitFor()
                  throws InterruptedException
Specified by:
waitFor in class Process
Throws:
InterruptedException

waitForTime

public final int waitForTime(long time,
                             TimeUnit unit)
                      throws InterruptedException,
                             TimeoutException
Throws:
InterruptedException
TimeoutException

exitValue

public final int exitValue()
Specified by:
exitValue in class Process

destroy

public final void destroy()
Specified by:
destroy in class Process

toString

public String toString()
Overrides:
toString in class Object

getCommand

public final List<String> getCommand()

getCommandLine

public final String getCommandLine()

getWorkingDirectory

public final File getWorkingDirectory()

getPid

public final long getPid()

isRunning

public final boolean isRunning()

isDestroyed

public final boolean isDestroyed()

getFuture

public final Future<Integer> getFuture()

getRecordedStdout

public final byte[] getRecordedStdout()
                               throws IllegalThreadStateException
Throws:
IllegalThreadStateException

getRecordedStderr

public final byte[] getRecordedStderr()
                               throws IllegalThreadStateException
Throws:
IllegalThreadStateException

getRecordedStdoutText

public final String getRecordedStdoutText()
                                   throws IllegalThreadStateException
Throws:
IllegalThreadStateException

getRecordedStderrText

public final String getRecordedStderrText()
                                   throws IllegalThreadStateException
Throws:
IllegalThreadStateException

onTerminated

protected void onTerminated()

onDestroyed

protected void onDestroyed()

newBuilder

public static AnyProcessBuilder<? extends AnyProcess> newBuilder()

isWindows

protected static boolean isWindows()

getCurrentPid

protected final String getCurrentPid()


Copyright © 2015. All rights reserved.