RescorerProvider rescorerProvider = getRescorerProvider();
try {
IDRescorer rescorer = rescorerProvider == null ? null :
rescorerProvider.getRecommendRescorer(new long[] {userID}, recommender, getRescorerParams(request));
Iterable<RecommendedItem> recommended =
recommender.recommend(userID, getHowMany(request), getConsiderKnownItems(request), rescorer);
output(request, response, recommended);
} catch (NoSuchUserException nsue) {
response.sendError(HttpServletResponse.SC_NOT_FOUND, nsue.toString());
} catch (NotReadyException nre) {
response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE, nre.toString());