private static <T>boolean completeTask(ViPRTaskMonitor<T> task,ViPRTaskHandler<T> handler){
  try {
    T value=task.getValue();
    handler.onSuccess(task.getTask(),value);
    return true;
  }
 catch (  ExecutionException e) {
    handler.onFailure(task.getTask(),e);
    return false;
  }
}

private static < T > boolean completeTask ( ViPRTaskMonitor < T > task , ViPRTaskHandler < T > handler ) { try { T value = task . getValue ( ) ; handler . onSuccess ( task . getTask ( ) , value ) ; return true ; } catch ( ExecutionException e ) { handler . onFailure ( task . getTask ( ) , e ) ; return false ; } }
completes a task using the given handler .
