@Override
	public void process(HttpServletRequest request,
			HttpServletResponse response, String mobileHash,
			List<String> message) {
		final EntityManager manager = EMF.get().createEntityManager();
		try {
			ChessUser user = manager.find(ChessUser.class, mobileHash);
			String option = message.get(0);
			boolean listAll = "all".equalsIgnoreCase(option);
			List<Challenge> challenges = DB_Util.getChallenges(manager,
					user.getMobileHash(), user.getRating(), listAll);
			String startIndexString = request.getParameter("startIndex");
			ListIterator<Challenge> challengeIterator = new ListIterator<Challenge>(
					listAll ? "Open Challenges" : "Challenges Specific To You",
					challenges, startIndexString == null ? 1
							: Integer.parseInt(startIndexString),
					"/listChallenges?txtweb-message=" + option + "&",
					"<br/><br/>Reply, '[option] reject' to reject the challenge") {

				@Override
				public String getRowLink(Challenge challenge) {
					ChessUser opponent = manager.find(ChessUser.class,
							challenge.getCreatedBy());

					return "<a href='/acceptChallenge?challengeId="
							+ challenge.getId() + "'> Play as "
							+ challenge.getOpponentColor() + " vs "
							+ opponent.getUserName() + "("
							+ opponent.getRating() + ")</a>";
				}
			};
			request.setAttribute("__listIterator", challengeIterator);
			setJspPath("/jsp/common/ListIteratorHandler.jsp");
		} finally {
			manager.close();
		}
	}