| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.faban.common.CommandHandleImpl
public class CommandHandleImpl
Implementation of the remote command handle.
| Method Summary | |
|---|---|
|  void | destroy()Forfully terminates the command. | 
|  int | exitValue()Obtains the exit value of the command. | 
|  byte[] | fetchOutput(int streamId)Obtains the stdout or stderr of the command. | 
|  FileTransfer | fetchOutput(int streamId,
            String destFile)Obtains the stdout or stderr of the command and put it into file. | 
|  String | getCommandString()Obtains the command string this command handle represents. | 
|  void | waitFor()Waits for the command to terminate. | 
|  void | waitFor(int timeout)Waits for the command to terminate, with a given timeout. | 
|  void | waitMatch()Waits for the command until it matches a certain string it its output streams. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Method Detail | 
|---|
public String getCommandString()
getCommandString in interface CommandHandlepublic void destroy()
destroy in interface CommandHandle
public void waitFor()
             throws InterruptedException
waitFor in interface CommandHandleInterruptedException - The waiting thread got interrupted
public void waitFor(int timeout)
             throws InterruptedException
waitFor in interface CommandHandletimeout - The time out
InterruptedException - The waiting thread got interrupted.public int exitValue()
exitValue in interface CommandHandle
public byte[] fetchOutput(int streamId)
                   throws IOException
fetchOutput in interface CommandHandlestreamId - Command.STDOUT or Command.STDERR
IOException - There is an error getting the output
public FileTransfer fetchOutput(int streamId,
                                String destFile)
                         throws IOException,
                                IllegalStateException
fetchOutput in interface CommandHandlestreamId - Command.STDOUT or Command.STDERRdestFile - The destination file on the calling system
IOException - There is an error getting the output
IllegalStateException - The command is not yet terminated or
                                  does not record output
RemoteException - A network error occurred
public void waitMatch()
               throws InterruptedException
InterruptedException - The wait was interrupted| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||