"Retrieving all recipients in emailList '" + emailList + "'.");
URL retrieveUrl = new URL(domainUrlBase + "emailList/"
+ SERVICE_VERSION + "/" + emailList + "/recipient/");
EmailListRecipientFeed allRecipients = new EmailListRecipientFeed();
EmailListRecipientFeed currentPage;
Link nextLink;
do {
currentPage = emailListRecipientService.getFeed(retrieveUrl, EmailListRecipientFeed.class);
allRecipients.getEntries().addAll(currentPage.getEntries());
nextLink = currentPage.getLink(Link.Rel.NEXT, Link.Type.ATOM);
if (nextLink != null) {
retrieveUrl = new URL(nextLink.getHref());
}
} while (nextLink != null);