public abstract class Command
extends java.lang.Object
| Constructor and Description |
|---|
Command(int timeout,
java.lang.String... commands) |
Command(java.lang.String... commands) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCommand() |
int |
getID() |
int |
keepAlive() |
abstract void |
onFinished(int id) |
abstract void |
onUpdate(int id,
java.lang.String message) |
void |
setExitCode(int code) |
void |
terminate(java.lang.String reason) |
int |
waitForFinish() |
int |
waitForFinish(long timeout) |
public Command(java.lang.String... commands)
public Command(int timeout,
java.lang.String... commands)
public abstract void onUpdate(int id,
java.lang.String message)
public abstract void onFinished(int id)
public int getID()
public void setExitCode(int code)
public void terminate(java.lang.String reason)
public int waitForFinish(long timeout)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic int keepAlive()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic int waitForFinish()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic java.lang.String getCommand()