Also, I am trying to retrieve the task based on the task id:
public Task getTask( long taskId )
{
BlockingGetTaskResponseHandler responseHandler = new BlockingGetTaskResponseHandler();
client.getTask( taskId, responseHandler );
responseHandler.waitTillDone( 1000 );
return responseHandler.getTask();
}