use of io.fabric8.jolokia.facade.mbeans.FabricMBean in project fabric8 by jboss-fuse.
the class FabricMBeanFacadeTest method testGetProfileIds.
@Test
public void testGetProfileIds() {
// this can only be run if you have a fabric running...
Assume.assumeTrue(Boolean.valueOf(System.getProperty("hasFabric")));
FabricMBean facade = getFabricMBean();
String json = facade.getProfileIds("1.0");
try {
Collection<String> profiles = Helpers.getObjectMapper().readValue(json, TypeFactory.defaultInstance().constructParametricType(Collection.class, String.class));
Assume.assumeNotNull(profiles);
for (String profile : profiles) {
System.out.println("Profile id:" + profile);
}
} catch (Exception e) {
e.printStackTrace();
}
}
use of io.fabric8.jolokia.facade.mbeans.FabricMBean in project fabric8 by jboss-fuse.
the class FabricMBeanFacadeTest method testGetProfilesFields.
@Test
public void testGetProfilesFields() {
// this can only be run if you have a fabric running...
Assume.assumeTrue(Boolean.valueOf(System.getProperty("hasFabric")));
FabricMBean facade = getFabricMBean();
String json = facade.getProfiles("1.0", Helpers.toList("id"));
try {
Collection<ProfileDTO> profiles = Helpers.getObjectMapper().readValue(json, TypeFactory.defaultInstance().constructParametricType(Collection.class, ProfileDTO.class));
Assume.assumeNotNull(profiles);
for (ProfileDTO profile : profiles) {
System.out.println(profile);
}
} catch (Exception e) {
e.printStackTrace();
}
}
use of io.fabric8.jolokia.facade.mbeans.FabricMBean in project fabric8 by jboss-fuse.
the class FabricMBeanFacadeTest method testGetFabricFields.
@Test
public void testGetFabricFields() {
// this can only be run if you have a fabric running...
Assume.assumeTrue(Boolean.valueOf(System.getProperty("hasFabric")));
FabricMBean facade = getFabricMBean();
String json = facade.getFabricFields();
try {
FabricDTO dto = Helpers.getObjectMapper().readValue(json, FabricDTO.class);
Assume.assumeNotNull(dto);
System.out.println(dto);
} catch (Exception e) {
e.printStackTrace();
}
}
use of io.fabric8.jolokia.facade.mbeans.FabricMBean in project fabric8 by jboss-fuse.
the class FabricMBeanFacadeTest method testFabricStatus.
@Test
public void testFabricStatus() {
// this can only be run if you have a fabric running...
Assume.assumeTrue(Boolean.valueOf(System.getProperty("hasFabric")));
FabricMBean facade = getFabricMBean();
String json = facade.fabricStatus();
try {
FabricStatusDTO status = Helpers.getObjectMapper().readValue(json, FabricStatusDTO.class);
Assume.assumeNotNull(status);
System.out.println(status);
} catch (Exception e) {
e.printStackTrace();
}
}
use of io.fabric8.jolokia.facade.mbeans.FabricMBean in project fabric8 by jboss-fuse.
the class FabricMBeanFacadeTest method testVersionsWithOnlyIDs.
@Test
public void testVersionsWithOnlyIDs() {
// 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(Helpers.toList("id"));
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