use of io.fabric8.jolokia.facade.mbeans.FabricMBean in project fabric8 by jboss-fuse.
the class FabricMBeanFacadeTest method getFabricMBean.
private FabricMBean getFabricMBean() {
JolokiaFabricConnector connector = JolokiaFabricConnector.getFabricConnector(userName, password, url);
FabricMBean mBeanFacade = new FabricMBean(connector);
return mBeanFacade;
}
use of io.fabric8.jolokia.facade.mbeans.FabricMBean in project fabric8 by jboss-fuse.
the class FabricMBeanFacadeTest method testVersions.
@Test
public void testVersions() {
// this can only be run if you have a fabric running...
Assume.assumeTrue(Boolean.valueOf(System.getProperty("hasFabric")));
FabricMBean facade = getFabricMBean();
String json = facade.versions();
try {
Collection<VersionDTO> versions = Helpers.getObjectMapper().readValue(json, TypeFactory.defaultInstance().constructParametricType(Collection.class, VersionDTO.class));
Assume.assumeNotNull(versions);
for (Object version : versions) {
System.out.println(version);
}
} catch (Exception e) {
e.printStackTrace();
}
}
Aggregations