|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface CommandHandle
A handle interface for a command executed on a local or remote system.
| 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. |
| Method Detail |
|---|
String getCommandString()
throws RemoteException
RemoteException - A network error occurred
void destroy()
throws RemoteException
RemoteException - A network error occurred
void waitFor()
throws InterruptedException,
RemoteException
InterruptedException - The waiting thread got interrupted
RemoteException - A network error occurred
void waitFor(int timeout)
throws InterruptedException,
RemoteException
timeout - The time out
InterruptedException - The waiting thread got interrupted.
RemoteException
int exitValue()
throws IllegalStateException,
RemoteException
IllegalStateException - If the command has not yet terminated
RemoteException - A network error occurred
byte[] fetchOutput(int streamId)
throws IOException,
IllegalStateException,
RemoteException
streamId - Command.STDOUT or Command.STDERR
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
FileTransfer fetchOutput(int streamId,
String destFile)
throws IOException,
IllegalStateException,
RemoteException
streamId - 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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||