public void handleComponentEvent(
     ComponentEventRequestParameters parameters, ComponentRequestHandler handler)
     throws IOException {
   StopWatch watch = profilePage(parameters.getActivePageName());
   handler.handleComponentEvent(parameters);
   watch.stop(watch.getTag(), "Component event handled");
 }
 /**
  * matrix test
  *
  * @throws Exception exception
  */
 public void testMatrix() throws Exception {
   ChatMessage msg = constructMessage();
   int count = 100000;
   // hot swap
   for (int i = 0; i < 10000; i++) {
     hessian(msg);
     jackson(msg);
     jackson2(msg);
     msgpack(msg);
   }
   System.out.println(count + " loop:");
   StopWatch stopWatch = new StopWatch();
   stopWatch.start("hessian");
   for (int i = 0; i < count; i++) {
     hessian(msg);
   }
   stopWatch.stop("hessian");
   System.out.println(stopWatch.getTag() + ":" + stopWatch.getElapsedTime());
   stopWatch.start("jackson");
   for (int i = 0; i < count; i++) {
     jackson(msg);
   }
   stopWatch.stop("jackson");
   System.out.println(stopWatch.getTag() + ":" + stopWatch.getElapsedTime());
   stopWatch.start("msgpack");
   for (int i = 0; i < count; i++) {
     msgpack(msg);
   }
   stopWatch.stop("msgpack");
   System.out.println(stopWatch.getTag() + ":" + stopWatch.getElapsedTime());
   stopWatch.start("jackson2");
   for (int i = 0; i < count; i++) {
     jackson2(msg);
   }
   stopWatch.stop("jackson2");
   System.out.println(stopWatch.getTag() + ":" + stopWatch.getElapsedTime());
 }
 public void handlePageRender(
     PageRenderRequestParameters parameters, ComponentRequestHandler handler) throws IOException {
   StopWatch watch = profilePage(parameters.getLogicalPageName());
   handler.handlePageRender(parameters);
   watch.stop(watch.getTag(), "Page rendered");
 }