List<Property> payload = response.get(RESULT).asPropertyList();
List<Jvm> jvms = new ArrayList<Jvm>(payload.size());
for(Property prop : payload) {
String jvmName = prop.getName();
Jvm jvm = factory.jvm().as();
jvm.setName(jvmName);
ModelNode jvmPropValue = prop.getValue();
if(jvmPropValue.hasDefined("heap-size"))
jvm.setHeapSize(jvmPropValue.get("heap-size").asString());
if(jvmPropValue.hasDefined("max-heap-size"))
jvm.setMaxHeapSize(jvmPropValue.get("max-heap-size").asString());
if(jvmPropValue.hasDefined("debug-enabled"))
jvm.setDebugEnabled(jvmPropValue.get("debug-enabled").asBoolean());
jvms.add(jvm);
}
getView().setJvms(jvms);