Checking for task completion
To check to see if a task has completed invoke the
SshTask#isComplete
method.
Example
// wait until task is complete
while
(!task.isComplete()) {
Thread.sleep(
100
);
}