ServerDescriptor server = null;
if (getInfo() != null)
{
server = getInfo().getServerDescriptor();
}
CustomSearchResult csrSystem = null;
CustomSearchResult csrMemory = null;
if (server != null)
{
csrSystem = server.getSystemInformationMonitor();
csrMemory = server.getJvmMemoryUsageMonitor();
}
if (csrSystem != null)
{
for (int i=0 ; i<generalAttributes.size(); i++)
{
String value =
getMonitoringValue(generalAttributes.get(i), csrSystem);
JComponent l = generalMonitoringComps.get(i);
if (l instanceof JLabel)
{
((JLabel)l).setText(value);
}
else if (l instanceof JTextComponent)
{
((JTextComponent)l).setText(value);
}
else
{
throw new RuntimeException("Unexpected component: "+l);
}
}
}
else
{
for (JComponent l : generalMonitoringComps)
{
if (l instanceof JLabel)
{
((JLabel)l).setText(NO_VALUE_SET.toString());
}
else if (l instanceof JTextComponent)
{
((JTextComponent)l).setText(NO_VALUE_SET.toString());
}
else
{
throw new RuntimeException("Unexpected component: "+l);
}
}
}
if (csrMemory != null)
{
if (memoryAttributes.isEmpty())
{
Set<String> allNames = csrMemory.getAttributeNames();
SortedSet<String> sortedNames = new TreeSet<String>();
for (String attrName : allNames)
{
if (!attrName.equalsIgnoreCase(
ServerConstants.OBJECTCLASS_ATTRIBUTE_TYPE_NAME) &&