code: @GET
      public Response getMBeans(
              @QueryParam("key") @DefaultValue("root") String key,
              @QueryParam("mode") @DefaultValue("") String mode,
              @QueryParam("jsonp") @DefaultValue("") String jsonp)
              throws Exception {
  
          LOG.info("key" + key);
          DynaTreeNode root = new DynaTreeNode();
          for (String domain : jmx.getDomainList()) {
              root.putChild(jmx.getDomainTree(domain).setTitle(domain)
                      .setMode("domain"));
          }
  
          StringWriter out = new StringWriter();
          if (jsonp.isEmpty()) {
              root.getChildrenJSONArray().write(out);
          } else {
              out.append(jsonp).append("(");
              root.getChildrenJSONArray().write(out);
              out.append(");");
          }
  
          return Response.ok(out.toString()).header("Pragma", "no-cache")
                  .header("Cache-Control", "no-cache").header("Expires", "0")
                  .build();
      }
docs: Return JSON representing the entire tree of MBeans in DynaTree format.
  
  @param key
  @param mode