@Test @SuppressWarnings("unchecked") public void getWithPath() { List<JmxEndpoint.JmxBean> beans = (List<JmxEndpoint.JmxBean>) endpoint.get("java.lang:type=Runtime"); Assert.assertEquals(1, beans.size()); List<Map<String, String>> props = (List<Map<String, String>>) beans.get(0).getAttributes().get("SystemProperties"); Assert.assertEquals(System.getProperties().size(), props.size()); for (Map<String, String> prop : props) { String k = prop.get("key"); String v = prop.get("value"); Assert.assertEquals(System.getProperty(k), v); } }
@Override public Object get() { return get("*:*"); }
JmxEndpoint implements HttpEndpoint { @Override public Object get() { return get("*:*"); } }
JmxEndpoint implements HttpEndpoint { @Override public Object get() { return get("*:*"); } @Inject  JmxEndpoint();  JmxEndpoint(MBeanServer mBeanServer); }
JmxEndpoint implements HttpEndpoint { @Override public Object get() { return get("*:*"); } @Inject  JmxEndpoint();  JmxEndpoint(MBeanServer mBeanServer); @Override Object get(); @Override Object get(String path); }
JmxEndpoint implements HttpEndpoint { @Override public Object get() { return get("*:*"); } @Inject  JmxEndpoint();  JmxEndpoint(MBeanServer mBeanServer); @Override Object get(); @Override Object get(String path);  }