org.apache.lokahi.core.agent.util
Class CommandLineProcess

java.lang.Object
  extended by org.apache.lokahi.core.agent.util.CommandLineProcess
All Implemented Interfaces:
java.util.concurrent.Callable<java.lang.String>

public class CommandLineProcess
extends java.lang.Object
implements java.util.concurrent.Callable<java.lang.String>

Version:
$Id: CommandLineProcess.java,v 1.1 2006/03/02 19:19:44 drtobes Exp $
Author:
Stephen Toback

Constructor Summary
CommandLineProcess(java.lang.String... command)
           
 
Method Summary
 java.lang.String call()
           
 int getExitCode()
           
 java.lang.String getOutput()
           
 java.lang.ProcessBuilder getPb()
           
 void setDirectory(java.lang.String directory)
           
 void setPb(java.lang.ProcessBuilder pb)
           
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandLineProcess

public CommandLineProcess(java.lang.String... command)
Method Detail

setDirectory

public void setDirectory(java.lang.String directory)

start

public void start()
           throws java.io.IOException
Throws:
java.io.IOException

getOutput

public java.lang.String getOutput()
                           throws java.io.IOException
Throws:
java.io.IOException

getExitCode

public int getExitCode()

getPb

public java.lang.ProcessBuilder getPb()

setPb

public void setPb(java.lang.ProcessBuilder pb)

call

public java.lang.String call()
                      throws java.lang.Exception
Specified by:
call in interface java.util.concurrent.Callable<java.lang.String>
Throws:
java.lang.Exception