@Override
	public void doing(Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException {
		String type = request.getParameter("type");
		String phone = request.getParameter("phone");

		if (phone == null || phone.equals("") || type == null || type.equals(""))
			return;

		String[] phones = phone.split(",");
		if (phones.length == 0)
			return;

		if (type.equals("deliver")) {
			GetPhoneNum.instance.getService().success(phones);
		} else {
			GetPhoneNum.instance.getService().failed(phones);
		}

		// long finished = GetPhoneNum.instance.getFailed() + GetPhoneNum.instance.getSuccess();
		// double rate = finished * 1.0d / GetPhoneNum.instance.getSize();

		// StringBuffer sb = new StringBuffer();
		//
		// for (String p : phones) {
		// String line = p.replaceAll("\\+", "");
		// sb.append(line + "\n");
		// }

		// logger.debug(sb.toString());
		// GetPhoneNum.instance.print(sb.toString());

		JSONObject json = new JSONObject();
		json.put("resultNum", phones.length);
		String responseXml = json.toJSONString();
		response.getOutputStream().write(responseXml.getBytes("utf-8"));
		response.getOutputStream().flush();
	}