} else {
apiConfig.setDeadlineInSeconds(options.getDeadlineInSeconds());
}
Future<TaskQueueQueryAndOwnTasksResponse> responseFuture = apiHelper.makeAsyncCall(
"QueryAndOwnTasks", leaseRequest, new TaskQueueQueryAndOwnTasksResponse(), apiConfig);
return new FutureAdapter<TaskQueueQueryAndOwnTasksResponse, List<TaskHandle>>(responseFuture) {
@Override
protected List<TaskHandle> wrap(TaskQueueQueryAndOwnTasksResponse leaseResponse) {
List<TaskHandle> result = new ArrayList<TaskHandle>();
for (TaskQueueQueryAndOwnTasksResponse.Task response : leaseResponse.tasks()) {