class MqHandler implements Handler {

	@Override
	public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)
			throws IOException, ServletException {
		if (maps.size() == 0) {
			synchronized (this) {
				if (maps.size() == 0) {
					mqClientStatController=MqSpringUtil.getBean(MqClientStatController.class);
					if(mqClientStatController==null) {
						mqClientStatController=new MqClientStatController();
					}
					initMap();
				}
			}
		}
		if (maps.containsKey(request.getRequestURI())) {
			response.setContentType("text/html;charset=UTF-8");
			StringBuilder sbHtml = new StringBuilder();
			sbHtml.append(
					"<!doctype html><html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"></head><body>");

			try {
				sbHtml.append(maps.get(request.getRequestURI()).invoke(mqClientStatController).toString());
				sbHtml.append("</body></html>");
				response.getWriter().write(sbHtml.toString());
				response.flushBuffer();
			} catch (Exception e) {
			}
		}
	}

}