checkRequiredProperty(domain, "domain");
checkRequiredProperty(taskListToPoll, "taskListToPoll");
initialized = true;
}
PollForActivityTaskRequest pollRequest = new PollForActivityTaskRequest();
pollRequest.setDomain(domain);
pollRequest.setIdentity(identity);
pollRequest.setTaskList(new TaskList().withName(taskListToPoll));
if (log.isDebugEnabled()) {
log.debug("poll request begin: " + pollRequest);
}
ActivityTask result = service.pollForActivityTask(pollRequest);
if (result == null || result.getTaskToken() == null) {